Repository navigation
drm/asahi: cut the G17 cross-queue hop tail - #468
Merged
DjDeveloperr merged 2 commits intoOct 27, 2026
Merged
Conversation
…aited A queue whose retirement stops at a command with a completion record but no covering stamp yet sets retire_pending, which counted as leaving ordinary retirement: the next publication rang its doorbell at once, and a withheld doorbell was released whatever its predecessors. That happens after most completions. Each doorbell makes the firmware read the work ring, and a hop between queues whose producer ends 30-80 us after one is slowed by 12-24 us. The withheld doorbell already counts only predecessors without a completion record, which covers a front waiting for its stamp. Count retire_pending as settling only when the front has no record, the case of a command the firmware finished without one. In a two-queue semaphore ping-pong (gpubench sync.signal, 0.6 s traced), doorbells rung at publication fall from 2006 to 96 and releases forced by settling from 1280 to 23; all doorbells fall from 8035 to 6707.
…overed A doorbell announces every work slot written on its ring, so a withheld doorbell of one queue is often covered by a doorbell another queue rings. Publications of the first queue after that kept the withheld doorbell's first publication, whose predecessors had long retired: the doorbell was due at once and rang for one or two new slots. In a two-queue semaphore ping-pong almost half of all releases announced a single slot. When a publication finds that another doorbell announced every slot the withheld one covered, it starts the withheld doorbell over from itself, so the doorbell waits for this command's own predecessors. Measured on Neo with this and the previous change against the base in the same boot, alternating, three rounds (us, medians): sync.signal ping-pong doorbells 7409 -> 4625 hops slowed by more than 7 us 19.6% -> 13.9% sync.signal timeline, per hop 23.40 -> 22.83 sync.signal binary, per hop 23.35 -> 22.67 compute.light queue d64 13.89 -> 13.11 The median hop is unchanged; compute.light queue d1/d2/d3/d4, queues d1/d2/d4 and render.light d1/d32 stay within 1%.
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.
Summary
This follows up #423 and cuts the tail of the G17 cross-queue hop. #423 withholds a compute doorbell while two or more unretired commands of its queue are ahead. On Neo, about a third of the remaining doorbells and most of the slow hops came from two cases:
retire_pendingcounted as settling even when the front command already had its completion record and was only waiting for its completion stamp. That front then rang the next publication at once, or released a withheld doorbell early. It now counts as settling only when the front has no completion record.The median hop already matched macOS after #423. These changes move the tail.
Measurements
Neo, same boot, three rounds (ABC/CBA/ABC), with Mesa from aurora-silicon/mesa#62. "Before" is #423's tested head.
A second same-boot run gave the binary hop −6.1%, compute queue d3 +0.2% and d4 −0.2%.
Testing
The module built from exactly these two commits on #423's tested head:
performance-regression.sh): PASS;The commits apply unchanged on integration/aurora. The #423 merge didn't touch
g17/queue/compute.rsorg17/runtime.rs, and its merged module was checked against #423's in the gate, the targeted CTS and the light rows.A third change, releasing a withheld doorbell only once no predecessor lacks a completion record, cut slow hops further. It regressed compute queue d4 by 21%, so it is not included.