Repository navigation
drm/asahi: g17: keep innocent clients alive across another client's recovery - #803
Merged
RyanTheTide merged 2 commits intoNov 2, 2026
Conversation
…ecovery A recovery for one client's hang still killed the others: a CS2 reason-0 recovery cancelled 42 commands and Hyprland got ECANCELED from fail_unpublished(), which Honeykrisp treats as a lost device, so the desktop froze until a reboot. - ECANCELED is not reported as this client's failure from fail_unpublished(), the ordered output publication, or fail_while_owned() for spared work. Work the firmware listed as interrupted keeps reporting its failure. - Publication waits for a pending recovery, or for this owner's spared pair to drain, for up to RECOVERY_WAIT_MS (26 s) instead of the usual 2 s: the compute admission deadline extends (Admission:: extend_for_recovery) in ensure_compute, in the recovery waits of compute_packet including the input-source wait, and in Gate::enter_until, whose gate only a recovery closes; the render waits keep a WaitClock whose usual bound starts afresh once the recovery ends, and render admission extends its deadline while a recovery is pending. A spared quarantined pair waits until the caller's deadline; a guilty pair's publication still fails after a second. - Commands with failed inputs or predecessors stay cancelled: a failed fence does not prove its producer retired. The compute deadline host tests move to the longer recovery budget, and a mutant now checks that removing the extension fails them. Link: aurora-silicon#433 Co-developed-by: Ryan Murray <ryan@aurorasilicon.org> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
…led with A command whose input fence, ordered predecessor or compute source failed inherits the failure through inherited_error(). Only EIO, ENODEV and ETIMEDOUT became ECANCELED; any other error passed through unchanged and was reported as the consumer's own failure, which userspace treats as a lost device. A GPU recovery fails the render groups it dropped and cannot replay with ENODATA. One such recovery (render slot 10, 11 groups of a muvm GPU worker) took down Xwayland, whose next command consumed one of the worker's buffers. Xwayland's own commands then failed, so its buffers kept that failure in their fences, and 85 minutes later a newly started muvm GPU worker that imported them failed with ENODATA too, without any recovery. Cancel the consumer for every producer failure. ECANCELED is not reported as a device loss and does not poison the consumer's VM; its fence still carries the error, as the UAPI documents. An interrupted fence wait is not a producer failure and keeps its own error. G15 reports every input failure as a client failure anyway, so it keeps inherited_error() unchanged. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
This was referenced Nov 1, 2026
Contributor
|
Merged into aurora-wip. This exact tree was booted on the Neo (A18 Pro, G17P) as a one-shot of 7.3.0-aurora-prr1103: aurora-wip c243830 plus this PR and the other open aurora-wip PRs.
The J616s run of this tree is queued with PR 837 in the next J616s slot. Thanks Jonathan. |
mchalunderscore
pushed a commit
to mchalunderscore/linux
that referenced
this pull request
Nov 4, 2026
…nto integration/aurora Bring integration/aurora up to the aurora-wip tip 9ff2b9a. After this merge the two branches have the same tree. The range contains the fleet14o source c243830 (aurora-silicon#857, aurora-silicon#858, aurora-silicon#795, aurora-silicon#859), which was promoted on all four machines on 2026-11-02 and 03, and the merges after it: aurora-silicon#861 (apple-dcp selftest stubs for aurora-silicon#858), aurora-silicon#860 (SEP keybag in the shared xART window, the aurora-wip copy of aurora-silicon#856), aurora-silicon#724 (J616s boot NOR, both parts), aurora-silicon#779 (ALS colour temperature ABI), aurora-silicon#862 (J700 GD25UF16E boot NOR, the Neo bless fix), aurora-silicon#863 (J616s ANE H16 start stall), aurora-silicon#797 (T6000 DCS whole-word writes) and aurora-silicon#803 (G17 keeps innocent clients alive across another client's recovery). aurora-silicon#858 and aurora-silicon#860 make the same changes integration/aurora already had as aurora-silicon#855 and aurora-silicon#856, so they merge without conflicts. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #433. That PR no longer applied: the G17 rework (#423) replaced the submission path it changed, and its hold on #438 went away when #438 closed. This is the same fix, ported onto
aurora-wipand kept on top of #556. It includes the ordering and cancellation fixup from #433 (Ryan's 986ec63).Problem. One client's GPU hang took down other clients. A CS2 hang cancelled 42 commands, Hyprland got
ECANCELEDfromfail_unpublished(), Honeykrisp treated that as a lost device, and the desktop froze until a reboot.1. Keep innocent clients alive across another client's recovery
ECANCELEDis no longer reported as the client's own failure fromfail_unpublished(), ordered output publication, orfail_while_owned()for spared work. Work the firmware listed as interrupted still reports its failure.RECOVERY_WAIT_MS(26 s) instead of 2 s. A guilty pair's publication still fails after a second.2. Cancel consumers of a failed producer whatever it failed with
inherited_error()only turnedEIO,ENODEVandETIMEDOUTintoECANCELED. A render group that a recovery dropped fails withENODATA, and that passed through to its consumers as their own lost device. In one case Xwayland died this way, and a VM started 85 minutes later failed on Xwayland's buffers without any recovery.G17 consumers now always get
ECANCELED. This is G17 only: G15 keepsinherited_error()unchanged, and no file underg15/changes. An interrupted fence wait is not a producer failure, so it keeps its own error.Host tests changed. Four tests pinned the old 2 s budget, so they move to the new one:
g17-compute-deadline-tests.py: a pending recovery now ends at 26 s, and a newno-recovery-extensionmutant fails if the extension is removed.g17-admission-deadline-tests.py: a spared quarantine now waits for the caller's deadline.g17-compute-constructor-tests.pyandg17-compute-growth-deadline-tests.py: fixture and mutant updates only.Tests
DRM_ASAHI+DRM_ASAHI_G16): 212 pass, 1 skipped of 213. The skip isapple_g17_rx_util_min_test, which needsCONFIG_UCLAMP_TASK. Three newasahi_g17_wait_clockcases cover the render wait deadline.tools/asahi/run-host-tests.py: 159 of 161.apple-dcpandg15-retention-tests --mutationsfail here, and fail the same on cleanaurora-wip52f0a6b on this machine.DRM_ASAHI_G15=yandDRM_APPLE=m.--strict: clean.Tested on hardware (J616s, M4 Pro). The G17 logic here has run on this machine's daily kernels since 2026-10-28, on an older
aurora-wipbase:Known limits
t3codeandHearthstone.exewhen their commands were in flight. So a recovery still costs a client that was running on the GPU at that moment; this PR protects the ones that were only queued or waiting.ENODATA.Not tested
PRODUCER_FAILEDreplaces the shared helper for G17, and the wait deadline moves intoWaitClock::deadlineso it can be unit tested.Diagnosed and written by Claude Opus 5.5.
🤖 Generated with Claude Code