Repository navigation
soc: apple: mailbox: receive G17 completions in the RT thread again - #3187
Conversation
Commit 4fa08b4 ("soc: apple: mailbox: drain G17 receive interrupts in hard IRQ") moved the ASCWrap v6 GPU receive path out of the oneshot IRQ thread: normal completions are now drained in hard IRQ, and the thread runs only when the receive budget saturates. The thread was doing more than adding a wakeup. It is an RT task, so while it runs schedutil raises its CPU cluster to the top frequency, and the G17 driver steers that through apple_mbox_set_rx_util_min(): Port::rx_update() keeps the RT default for host-bound streams and lowers it only while the GPU is the bottleneck. Since 4fa08b4 the completion of every light submission runs without that boost, from whichever CPU takes the interrupt. On the MacBook Neo (J700, A18 Pro) gpubench-vk compute.light regressed with that commit alone. Built on its own parent with only its merge reverted, 6 reps each: row with reverted 7.3.0-41 compute.light queue/d2 (us) 52.3 35.3 35.5 submit CPU (us) 12.0 9.6 9.7 latency (us) 110 64 64 reps that lose the overlap 6/6 0/6 0/6 compute.light queue/d1 (us) 106.0 102.1 102.3 render.light queue/d1 (us) 137.8 122.1 127.0 Bisected on J700 from 7.3.0-41 (6f618bc, rebuilt with the same toolchain and config as every other point) to 7c9d9ad: the regression first appears in 3989d21..19ae312, and reverting merge 99ebf93 (#2980) alone removes it, while reverting #3015 alone, or #2552, #2553 and #2207 together, or #2520, #3010 and #915 together, does not. Restore the threaded receive handler for ASCWrap v6 G17 mailboxes. Keep that commit's exclusion of ASCWrap v8 (T8152) from apple_mbox_is_g17(), so the T8152 GPU mailbox stays on apple_mbox_recv_irq() with its storm guard as it is now, and keep a KUnit case for that exclusion. With "drm/asahi: g17: keep G17P work nodes and compute descriptors firmware-cached" on origin/main 16da002, a one-shot J700 boot gives compute.light d2 34.5 us (submit CPU 9.5 us, 0/9 reps losing the overlap), d1 104.1 us, render.light d1 124.9 us; the multi_queue CTS family 4266/0 three times, compute CRCs 5/5, Geekbench 6 Vulkan 8/8, and no GPU fault, WARN or AVC. Signed-off-by: Diljit Singh <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
J773g (M4 Mac mini, G16G) no-regression row at How it was run: two guarded one-shots on the default cmdline.
|
There was a problem hiding this comment.
Verdict: MERGE at e8bb42119bac100f0171821401b893f6b663f910 once hardware evidence is complete.
Blockers: No code blocker found. Keep this unarmed until the J714s ASCWrap v6 row and exact-head equivalence for the stacked Neo evidence are posted.
Checked: The same immutable role predicate selects the threaded registration and the clamp/sleep branches. Clamp application precedes the receive spinlock; the budget sleep follows unlock while the oneshot line is still masked. The ASCWrap v8 role still bypasses both operations and reaches its existing guard. Read the KUnit v8 exclusion cases, the green head checks, and the exact-head J773g row. The change is mailbox-role based, with no board gating, DT bindings, private material, or attribution added.
Forward-merge main. apple_mbox_probe() conflicted with 551faaf ("key the receive-thread clamp on a threaded handler"): main records mbox->rx_threaded and registers its hard-IRQ drain plus thread pair, this branch registers apple_mbox_recv_irq() as the only, threaded handler. Keep rx_threaded from main and register this branch's single threaded handler when it is set; main's g17 hard-IRQ pair is already gone with this branch. The receive handler applies the clamp when rx_threaded is set, which is what apple_mbox_set_rx_util_min() keys on. Signed-off-by: Ryan Murray <[email protected]>
|
Forward-merged main into this branch (merge commit f4ffe76, no force push). apple_mbox_probe() conflicted with 551faaf (rx_threaded). The merge keeps |
There was a problem hiding this comment.
Verdict: MERGE at f4ffe76
Checked: The merge keeps rx_threaded aligned with the oneshot IRQ registration. The utilization clamp is reached only on the threaded path, and the saturation delay remains outside rx_lock. Keep the J714s ASCWrap v6 and Neo-equivalence receipts plus CI.
|
f4ffe76 J700 (MacBook Neo, T8140, G17P B1) PASS: combined guarded one-shot |
Signed-off-by: Ryan Murray <[email protected]>
|
Reviewed at f4ffe76 (the merge of main into this branch). I found no correctness problem. The merge only touches the probe/receive wiring, and it keeps the same change as before: ASCWrap v6 GFX/GFX1 get the oneshot threaded receive handler back, and the hard-IRQ handler stays for every other mailbox. The clamp call now checks One note, not blocking: drivers/soc/apple/mailbox-g17-test.h ( The new test can't tell this fix from the regression. It only calls The suite does run in CI, through |
Signed-off-by: Ryan Murray <[email protected]>
|
I merged current |
|
@DjDeveloperr code-owner notice: the review app approved this head, which only merges |
|
Merging at |
What: Receive ASCWrap v6 G17 GPU completions in the oneshot RT IRQ thread again, as before #2980 (
4fa08b46555a, "drain G17 receive interrupts in hard IRQ").apple_mbox_set_rx_util_min().Port::rx_update()keeps the RT default (full CPU boost) for host-bound streams and lowers it only while the GPU is the bottleneck.apple_mbox_is_g17()and a KUnit case for it, so the T8152 mailbox is unchanged frommain.Tested: J700 (A18 Pro, G17P), system Mesa
26.3.0-30.7.3.0-41's source6f618bccf94f, rebuilt with the same toolchain and config as every other point, to7c9d9adcda5a, one boot per point,gpubench-vk compute.light×6.3989d21784d1..19ae3124e50e.99ebf936e6fe(soc: apple: mailbox: drain G17 receive interrupts in hard IRQ #2980) alone removes it.19ae312419ae3124− #29807.3.0-41origin/main16da00248bc9: stacked with drm/asahi: g17: keep G17P work nodes and compute descriptors firmware-cached #3186 (kperf/kfixA, same change, rebased here onto61c7b88aca91), one one-shot boot.Risk: two-way door · every Mac whose GPU mailbox is ASCWrap v6 (T6040/T6041, T8140, T8142, T6050); T8152 unchanged.
Not yet:
gpubench-vksmoke, 0 mailbox or GPU errors) pluscompute.lightd1/d2. M5 runs this ASCWrap v6 path too, but its port does not attach the receive clamp.M4 (J773g or J616s) rowDone: J773g PASS ate8bb42119bac(soc: apple: mailbox: receive G17 completions in the RT thread again #3187 (comment)).CONFIG_KUNIT.