Skip to content

drm/asahi: retry G17 retained compute publication pressure - #382

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
fu-g17-retained-capacity-20261022
Oct 22, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
fu-g17-retained-capacity-20261022

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

A G17 compute submission could fail with EBUSY and lose its device when the retained command ring was simply full. This turns that case into the same bounded wait the publisher already uses for a full firmware ring.

The compute publisher retries EAGAIN before anything becomes visible to the firmware, under one admission deadline. Its retained-command preflight returned EBUSY instead, both for a healthy full ring and for a packet queued behind an earlier replay. The backend then failed the unpublished packet, so a client saw VK_ERROR_DEVICE_LOST for transient capacity pressure. On the Neo this showed up as sparse_binding_structures gpu_built cases losing their device at four parallel jobs, while passing when run alone.

Those two conditions now return EAGAIN. EBUSY stays for a quarantined or released queue, and the deadline, cancellation and VM status checks are unchanged. Nothing is written before the check, so a retry starts from the same state.

Testing:

  • New KUnit cases cover ring saturation, retirement and replay ordering with the production retained FIFO. The isolated asahi* KUnit suite passes.
  • Built as Neo kernel 73iq (73i plus this commit). The Neo results are below.

Neo results on 73iq (73i plus this commit), with the candidate Mesa:

  • 0 boot warnings. The kernel log shows the six known LowerVa capacity refusals, all absorbed, plus one informational completion-stamp line. There were no EBUSY lines, no runtime stops and no oopses.
  • The sparse_binding_structures gpu_built family (9,216 cases) ran twice at four parallel jobs. Every case passed both times, with no device loss.
  • Vulkan CTS stride50 (64,949 names): 27,826 Pass and 3 Warn, at both one and four parallel jobs. The two sparse_binding names that lost their device at four jobs on the previous kernel pass.
  • The 776-name targeted list has no regressions.

🤖 Generated with Claude Code

The compute publisher already retries EAGAIN before firmware visibility,
under one bounded admission deadline. Its retained-command preflight
instead returned EBUSY for a healthy full ring or an earlier replay. The
backend then failed an unpublished packet, exposing device loss for
transient capacity pressure.

Return EAGAIN for those two conditions, preserving EBUSY for quarantined
or released ownership and the existing deadline, cancellation and VM
status checks. No producer, descriptor or work count changes before this
check. Exercise saturation, retirement and replay ordering with the
production retained FIFO.

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