Repository navigation
drm/asahi: g17: reuse released objects early on M4 Pro 25G83 - #3544
Conversation
Cached descriptor storage, queue records and queue configuration that come back after their owner's release was consumed may be reused once the firmware has consumed every control record published before they came back. The A18 Pro does this; the M4 Pro kept the stricter fence of 34b438d until a create/destroy-heavy queue test ran on that hardware. Turn it on for 25G83. 25F84 and 26B123 keep the stricter fence.
There was a problem hiding this comment.
Verdict: MERGE at d0345a7a (wait for queued CI to finish green before merging)
Blockers: none
Checked:
drivers/gpu/drm/asahi/g17/fw/variant.rs(+5/-4): setsobjects_after_release: trueonV25G83and explicitly pinsobjects_after_release: falseonV25F84(which inherits..V25G83, andV26B123inherits..V25F84), whileV26A428_M5/V26B123_M5(false) andV26A428(true) remain untouched. Strictly isolated to M4 Pro (T6040)25G83.- Verified exhaustive J616s (
T6040,25G83) same-tree A/B hardware row:- 2x1000 serial create/close + 92-process qpair pool waves: 0 errors,
LowerVapool exhaustion reduced2 -> 0, 0 deferred>0 samples. - Multi-client stress (
>=3concurrent GPU clients + 4 concurrent RT CTS clients alongsidert.rays+ compute): 195 Pass -> Pass, 0 diffs, 0 GPU faults, 0 oops. - VK CTS 1.4.7.1 sync/query/compute/renderpass: 0 failures; 41-case
gpubenchneutral (-0.03%);tools/asahi/run-host-tests.py --only g17247/247PASS at head.
- 2x1000 serial create/close + 92-process qpair pool waves: 0 errors,
Evidence
Risk:two-way door. T6040 25G83 onlypresent.- All 20 queued CI checks (
apple-build,host-tests,pr-text,readiness, KUnit suites) pending atd0345a7a.
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train. App approved, CI green, J616s 25G83 row at head (the change only applies to the 25G83 firmware layout). Merges in 1 h under the 6-point rule unless you object. |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
|
A data point against this for 25G83, from my J616s (T6040, 25G83). On two local test kernels that still had the strict fence, the firmware stored through a compute descriptor ring after that ring's fence was met and the pool had handed it out again. Both crashes are the
So the store is for an older kick of the ring's previous owner, 5 to 16 ms after the ring came back, after the stamp word already covered a newer kick. The control-ring position does not order these deferred stores on this firmware. Both crashes came 60 to 140 ms after a render watchdog give-up (a render at its queue head for 30.7 s, retired without its stamps). The load was dEQP-VK synchronization2 in 10 processes. A create/close churn test without a stuck render would probably not reach it, which may be why your A/B was clean. Caveats: these were local kernels with other patches, not main at this head, and I have not run this exact commit. Since I started holding a vacated ring until its stamp covers the newest kick and the device owes no stamps, this signature has not come back in three runs. I can share the traces. Related: in these dumps the x0 that 34b438d read as work state + 0xf40 is a descriptor ring slot. |
Resolve g17/fw/variant.rs: keep main's objects_after_release (true on V25G83 from #3544, false on V25F84) and this branch's telemetry_protocol (PSTATE_8MS on V25G83, NONE on V25F84). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
What: let the M4 Pro (T6040) 25G83 firmware reuse released objects early (
objects_after_release). The cached descriptor storage, queue records and queue configuration that come back after their owner's release can then be reused once the firmware has consumed every control record published before they came back, not only after a later one. The A18 Pro already does this. The M4 Pro kept the stricter fence of 34b438d until a create/destroy-heavy queue test ran on that hardware, and this PR is that test.V25F84(andV26B123, which inherits it) is pinned to the old value until measured, so only the T6040 25G83 build changes behaviour. Follow-up to #3463 in the GPU-UNGATE chip-gate audit.Tested: J616s M4 Pro (T6040, 25G83), same-tree A/B: 0 errors in 2x1000 serial create/close + 92-process pool waves, 0 CTS regressions, 0 GPU faults, 0 oops, default restored.
Details on the J616s, one one-shot boot per arm. A = main 844781f + #3463 (now merged), B = A + this commit; the touched file is byte-identical to this head.
rt.raysloops and a compute client. 195 Pass -> Pass, 8 NS -> NS, 0 differences, 0 GPU faults, on both arms.tools/asahi/run-host-tests.py --only g17: 247/247 at this head.Risk: two-way door. T6040 25G83 only. Revert = flip the flag back.
Not yet: 25F84 / 26B123 (M4 Pro/Max on older or 27.2 firmware) measurements.
Evidence: traces/gpu/20261128-gpu-ungate/j616s-k4/ (lab store).