Repository navigation
drm/asahi: g17: M5: read the compute item-ring cursors once per publication - #1401
Merged
DjDeveloperr merged 1 commit intoNov 10, 2026
Conversation
This was referenced Nov 10, 2026
Merged
…cation An M5 compute publication read the item-ring cursors from shared GPU memory up to four times under the device mutex, three uncached loads each: for the room check, the record-slot check, the reclaim of consumed items and the producer it appends at. The producer is the host's and only this publication moves it; the firmware's consumer only advances. One snapshot taken at the room check therefore serves the rest, and a consumer read earlier is conservative for all three checks. Signed-off-by: Diljit Singh <[email protected]>
DjDeveloperr
force-pushed
the
dj/g17-m5-compute-cursor-snapshot
branch
from
November 10, 2026 09:11
9fda430 to
1ddc0f5
Compare
DjDeveloperr
changed the base branch from
funkzy/t6050-gpu-on-integration
to
dj/g17-restart-storm-progress
November 10, 2026 09:11
DjDeveloperr
changed the base branch from
dj/g17-restart-storm-progress
to
funkzy/t6050-gpu-on-integration
November 10, 2026 10:21
fbalazsy
pushed a commit
to fbalazsy/linux
that referenced
this pull request
Nov 11, 2026
The item-ring snapshot that aurora-silicon#1401 takes for an M5 compute publication served its room, record-slot and reclaim checks, but both appends (the configuration and its notification) still read the ring cursors again: three uncached loads each under the device mutex. The same argument covers them: the producer is the host's and only this publication moves it, and the firmware's consumer only advances, so the snapshot's consumer is conservative. The room check already required space for both items. Append against the snapshot, with the producer the publication has reached. Signed-off-by: Diljit Singh <[email protected]>
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.
At depth, M5 compute submissions are bound by the submitting thread's own CPU time. gpubench compute.light at depth 16 runs at exactly its
submit_cpu_us. About 10 µs of each submission runs under the device mutexg17::Shared::state, incompute_inline→publish_with_native_waits.A per-site timing build of the driver (measurement only, not part of this PR) split that hold. Among its stages, each item-ring
cursors()call is three loads from shared GPU memory, and one publication made up to four such calls:ensure_record_slot;The producer is the host's, and only this publication, under the device mutex, moves it. The firmware's consumer only advances. So one snapshot taken at the room check serves the rest, and an earlier consumer value is conservative for all three checks: room looks smaller, record-slot reuse waits longer, and the reclaim leaves the rest to the next publication. Non-M5 paths are unchanged.
Measured on the M5 Pro (J714s)
Integration Image with this lane's build of the driver, with and without this commit (only
aurora.kodiffers). gpubench is pinned to CPU 12, one of the faster 0x065 cores. The boots are interleaved, base and this commit three times each. µs per submit:The submit's own CPU time at d16 goes from 18.0 to 14.9 µs. compute.light d1 (157 µs) and the cross-queue hop are unchanged.
dEQP-VK samples with this commit:
gpubench core-a and feat: 41/41. No GPU recoveries or timeouts during the run.
queue/compute.rsis identical on this branch's head (0dd0833) and on the tested base, so this is the tested diff. It applies with no conflicts and was not rebuilt.🤖 Generated with Claude Code