Skip to content

drm/asahi: hide the teardown errors of a closing client again - #1427

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
gpu/closing-client-teardown
Nov 10, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
gpu/closing-client-teardown

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Since #1360 ("drm/asahi: finish an exiting client's work before its mappings go") a DRM file drops its queues before its VMs. Destroying a G17 queue fails its queued work with ENOENT (VM context gone) or ECANCELED (queue destroyed). The VM status hides those errors only once the client is closed, and it learned that only when the client's VM handle dropped — which now happens after the queues. Every client that simply exits with work queued was logged as:

aurora: GPU work of a client failed (ENOENT, reported at g17/runtime/backend.rs:83, client gpubench-stress[...]); the client sees a lost device

gpubench-stress xq.exit and life.churn fail on that kernel-log line on G16/G17 (J616s, Neo).

  • File::drop marks the status of every VM of the file as client-closed before any field (queues first) drops, as closing the VM handle first used to.
  • VmStatus::mark_client_closed() is split out of release_mirror(), which still drops the mirror at VM close.
  • Device loss of such a client (EIO, ETIMEDOUT, ENODEV) is still warned about.
  • New KUnit test a_closing_file_hides_teardown_errors_before_its_vm_goes.

G13/G14 VMs carry no status (untracked submissions), so their #1360 drain is unaffected.

Results (J616s, one-shot boots of fleet48 cbf94db with and without this change)

kernel boot ENOENT ... lost device lines gpubench-stress --all
fleet48 1 46 14/17: xq.exit, life.churn (this line), queue.depth
fleet48 2 28 14/17: same
fleet48 + this change 1 0 xq.exit PASS, life.churn PASS
fleet48 + this change 3 0 17/17 on a fresh boot
  • The other rows of the same boots (36,127-case Vulkan CTS slice at 8 processes: Pass 18621 / NotSupported 17502 on both kernels; ray-query CTS) are unchanged.
  • Boot 2 of the changed kernel hit the known 25G83 channel-error firmware crash (unknown firmware event 7) in its first ray-query row, as unchanged kernels did before on this load; it is tracked separately and gave no stress row.
  • queue.depth (128 + 64 submissions in flight on one queue) still fails on both kernels and is tracked separately.
  • Host tests: run-host-tests 224/224.

🤖 Generated with Claude Code

Since "drm/asahi: finish an exiting client's work before its mappings
go", a DRM file drops its queues before its VMs. Destroying a G17 queue
fails its queued work with ENOENT (VM context gone) or ECANCELED (queue
destroyed), which nobody can see once the client is closing, and the VM
status hides those errors only after the client's VM handle is gone.
With the VMs now dropped last, every such failure of a client that
simply exited was logged as "GPU work of a client failed (ENOENT, ...);
the client sees a lost device". gpubench-stress xq.exit and life.churn
fail on that kernel-log line on a J616s, where fleet46 passed them.

Mark the status of every VM of the file as closed when the file starts
closing, before any queue goes, as closing the VM handle first used to.
Device loss of such a client (EIO, ETIMEDOUT, ENODEV) is still warned
about.

Fixes: dbe881e ("drm/asahi: finish an exiting client's work before its mappings go")
Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant