Repository navigation
drm/asahi: g17: no performance floor outside M5 - #2607
RyanTheTide merged 5 commits into
Conversation
|
Rows from our two non-M5 G17 machines: a Neo (J700, T8140) and a J616s (T6040, 25G83). Both use the same method: the fleet76 kernel (integration e00fb9a) with two module builds that differ only by this diff, one boot per arm. Power: the floor is real on both, and this removes it. With the patch, light paced work runs at state 1 instead of 10, at the same frame rate:
But two regressions, so I don't think it can go in as is:
Method and raw numbers
Assisted-by: LLM (Claude:Opus 5.5) |
|
Thanks for the two machines' worth of rows. They settle the power side, and both regressions are real. I've moved this back to draft. Recoveries: I haven't reproduced them on the J616C yet. That's with the daily kernel carrying this PR, dEQP-VK 1.4.7.1 from neo-cts-kit-base2-v8, and 4 concurrent workers over the 420 Submit-and-wait: I measured only the mild end of this (vkdep, -5 to -9 %). A strictly serialised client never gives the firmware's own controller enough utilisation to ramp, and M5's rule doesn't help either: it puts the floor back whenever a host thread waits, and every game always has a waiter, so CS2 at 120 Hz went back to state 10 and the same power. What I'd try next: keep no floor by default, and publish the full effort only while Disclosure: prepared with an AI tool (the commits carry Assisted-by: LLM); tested as described. |
|
Adding to the Neo/J616s rows above, two code points:
On the policy itself, the comment's numbers point to keeping some floor for clients that submit and then block (the glFinish-per-frame rows), and dropping it only for pipelined streams like the CS2 case. The recoveries in the geometry/tessellation sync cases also need explaining before the floor goes away on T8140/T6040. Assisted-by: LLM (Claude:Opus 5.5) |
|
@AxxzyWasTaken, here is the exact set and sharding from the Neo/J616s rows: https://gist.github.com/RyanTheTide/525b63d735047b2202a4490fbcf3194b
All recoveries hit the Assisted-by: LLM (Claude:Opus 5.5) |
|
Two candidate fixes for the submit-and-wait regression, tested on my J616C (T6041, 25G83). Each ran on one boot with a live switch: "always" = before this PR, "v1" = this PR as posted, then the candidate. The daily kernel already carried #2612. A. Floor only while
vkdep's rounds are about 2.5 ms apart, more than the detector's 2 ms, so it never fires there. CS2's short gaps inside a frame do trip it. B. M5's wait rule, counting only waits by the process that submitted the work: fixes vkdep, but not the power. Each output fence records its submitter's tgid, and
The v1 CS2 row in this table is the important one. Earlier the same scene under v1 held 120 fps at states 4-7 and 44.8 W. On this boot it stayed at state 1 and ran at 48 fps. So the behaviour is bistable. CS2 waits on its own frames: once the GPU is slow, those waits block, the firmware sees too little utilisation to ramp, and the game never recovers. Your submit-and-wait regression also hits a real game, not only probes. B avoids it because CS2's own waits bring the floor back, but that also gives up CS2's saving. Other rows:
Where this leaves it: neither a host-side timing rule nor a waiter rule separates "GPU on the critical path" from "paced game". Both misjudge one of vkdep and CS2. That supports your lane's plan to drive this from the firmware's own utilisation: the v1 stuck state is the firmware sitting at state 1 while a client is blocked on it. I'll run your commits on the J616C as soon as they're up. The local test branches, if they're useful: refill-gap candidate 00c8c73e, own-wait candidate on j616c/own-wait. This PR stays in draft until there's a fix. Disclosure: prepared with an AI tool (the commits carry Assisted-by: LLM); tested as described. |
|
Both regressions are explained now. Three commits on top of this PR fix them, on
Recoveries. I traced the 7 runs that recovered on the Neo (8 recoveries; tracefs Submit-and-wait. The firmware raises the state for work queued behind the running command, not for busy time. A glFinish loop keeps the GPU powered and about 90 % busy with nothing queued, and the firmware reports state 1 the whole time. Commit 1 tracks how long the GPU has run without going idle, from the firmware's own per-command start/end timestamps. A gap of the firmware's 2 ms power-off delay ends a run. Once a run outlasts the effort hold (16 ms), the effort goes to full until the idle check takes it down. Paced frames idle longer than 2 ms, so they stay on the floor. Same-boot results (module builds of fleet76 + this PR + the commits; one boot per Mac; the policy switched at runtime by a test-only parameter that isn't in the commits):
So the floor costs a third to two thirds of a watt over this PR at 60 Hz on the J616s, and still saves 3.2-3.5 W against the base. Every paced row kept its frame rate. Still to run:
Method, traces and test details
Assisted-by: LLM (Claude:Opus 5.5) |
|
J616C (T6041, 25G83) rows for Build: this Mac's daily GPU driver (#2607 v1 + #2612's wide pool window on the ia33 daily tree) plus the three commits, cherry-picked. Two small conflicts: in Firmware words (
So the graded floor works here: state 2 / w11 200, where v1 gave state 1 / w11 100. (My earlier sweep through a separate override module read w11 = 1000 for every nonzero effort, so that module's path must have published something else. Your reading of the units is the one that holds.) Throughput:
Concurrent sync: 4-worker dEQP over the 420 GPU faults, recoveries, timeouts: 0. Next: CS2 FIFO 120 (power, state histogram, fps) on this build vs v1 once the user's session is up. I'll put it here. Disclosure: prepared with an AI tool (the commits carry Assisted-by: LLM); tested as described. |
|
Thanks, that settles the T6041 side of the floor: state 2 / w11 200 under load, with no faults or recoveries. vkdep: your reading is right. Here are the numbers. At 389 rounds/s with the full effort a round takes 2.57 ms, and with the floor about 3.0 ms. The GPU part of a round at state 2 (618 of 1578 MHz on the J616s table) is about 2.5 times its state 10 time. So the ~0.45 ms difference puts the GPU at roughly 0.3 ms per round at state 10 and 0.75 ms at state 2. That leaves over 2 ms of host turnaround per round. Every round therefore idles longer than the firmware's 2 ms power-off delay, and the busy run never builds. The GPU is only about a quarter busy in that loop; the host's latency bounds it, not GPU throughput. Busy time can't tell it apart from paced work. What could is a waiter rule, and the plain M5 one is what held CS2 at state 10. A narrower waiter rule seems worth one CS2 run: full effort only while a host thread is blocked on work with nothing queued behind it. That's the case where the firmware can't see any demand, because the queue is on the host. A game with a frame queued behind the one being waited on wouldn't trigger it, and the firmware ramps that game by itself. The risk is the compositor: its implicit-sync waits on a client's only frame look the same. So it needs your CS2 FIFO 120 power row before it goes anywhere. I'll write it as a separate commit with its own A/B on our two Macs, and keep it out of the three commits, which stand on their own: no recoveries, and glFinish-type loops back at base speed. Also from our side since the comment above: an M2 (G14) no-regression row with the same module (the change is G17-only code). dEQP-VK s600 has 0 per-case changes against stock fleet76, 0 GPU kernel lines, and equal pace rows. Assisted-by: LLM (Claude:Opus 5.5) |
|
A correction to the waiter idea above, before anyone spends a CS2 run on it. Our own paced probe calls glFinish every frame, so at 60 Hz a host thread is blocked on the only work in flight once per frame. "Blocked on work with nothing queued behind it" would boost every paced client that waits like that. So it can't tell vkdep from paced work any better than busy time can, and I won't write it. What does tell them apart is the response to a boost. vkdep's round rate rises with the clock, while a paced client just idles longer. That's a feedback controller: boost, measure the submission rate, keep or drop. It needs its own design and rows, so I'd keep it out of this PR. With the three commits, vkdep stays where #2607 v1 put it (327 vs 316-337 rounds/s) and below the full effort (389). glFinish-type loops with sub-2 ms host turnaround are back at base speed, and the recoveries are gone. Assisted-by: LLM (Claude:Opus 5.5) |
|
The J616s (T6040) 120 Hz row on the pushed head (
All paced rows kept their frame rate. 120 Hz now stays on the floor, like the Neo, where the earlier build held state 10. That finishes the J616s, Neo and M2 rows on our side. CS2 FIFO 120 on the J616C is the open one. Assisted-by: LLM (Claude:Opus 5.5) |
The firmware takes the region C effort word as a floor for its
performance state. Outside M5 (T8140, T6040, T6041) the driver published
the full effort for as long as work kept arriving, and dropped it only after
16 ms without a submission. A game never leaves that gap, so the GPU sat
at its top state (10) whatever the load: the firmware's own statistics
show its load near zero with the state still at 10.
Publish no effort outside M5 and leave the state to the firmware's
own controller, as M5 already does while work streams. M5's exception
(the full effort while a host thread waits on a fence) is not carried
over: a game always has one, so it would keep the floor.
On a J616C (T6041, firmware 25G83), CS2 capped at 120 fps:
before after
fps 120.0 120.0
GPU state (0x1b) 10 always 4-7 mostly
GPU rail (PSVR) 35.1 W 25.2 W
SoC (PHPC) 39.9 W 31.3 W
system (PSTR) 52.0 W 42.0 W
Uncapped, the frame rate is unchanged (175.5-176.1 vs 176.1-176.4 fps)
and the state stays at 10. A tight submit-and-wait loop is about 5-9 %
slower (vkdep: 370-400 vs 355-369 rounds/s, noisy), the cost of the
firmware ramping up instead of starting at the top.
Signed-off-by: AxxzyWasTaken <[email protected]>
With no effort published outside M5, the firmware's own controller sets the performance state. It raises the state for work queued behind the running command, not for how busy the GPU is. A client that submits one command and waits for it before the next (glFinish per frame, a dependent dispatch chain) never queues anything, so the GPU stays at state 1 even when it is busy most of the time. On a Neo (T8140) and a J616s (T6040), both on firmware that reports state 1 for 100 % of such a loop, the loops ran 27-65 % slower than with the full effort. Track how long the GPU has run without going idle, from the start and end timestamps the firmware writes for every command. A gap at least as long as the firmware's idle power-off delay (2 ms) ends a run; the host's own keep-powered hold can be longer than a frame, so it doesn't mark idle. Once a run has lasted longer than the effort is held after work stops (16 ms), the GPU is the bottleneck and gets the full effort until the idle check takes it down. Paced work idles between frames and keeps leaving the state to the firmware. A frame that leaves less idle time than the power-off delay counts as bound, which is when a higher state helps it. A host waiter can't tell the two cases apart: paced work has one too (the compositor, or the next frame's fence). M5 keeps its waiter rule. Signed-off-by: Ryan Murray <[email protected]>
sleep_quiet() refuses while the published effort is nonzero, which is meant as "the idle check has taken the effort down". Outside M5 the published effort is now zero for most streaming work, so the check passed while the idle check had not yet run its Clear, which is also what drops the performance-controller demand (Port::set_effort_full). Also refuse while the effort is still streaming. Signed-off-by: Ryan Murray <[email protected]>
With no effort published while work streams, the firmware's own
controller lets the performance state fall to the base state (state 1,
the one it powers the GPU up in) even with work in flight. Concurrent
geometry and tessellation work stalls the GPU there. Nothing completes
on any queue for 30-60 ms, then the firmware asks for a restart with no
fault and blames a render that never started ("firmware blamed queue
N, failing its oldest render"), and the client loses its device.
On a Neo (T8140), 4 dEQP-VK workers over the synchronization cases with
a geometry or tessellation stage hit this in 7 of 15 runs, with the
firmware at state 1 at every stall. A fixed effort that kept the state
at 3 or above gave 0 of 15, as did the full effort (0 of 10). With this
change: 0 of 30, against 7 of 15 without it on the same boot. A J616s
(T6040) gave 0 of 30.
The effort is a fraction of the top state's frequency (16.16): 0.25,
0.5 and 0.75 put the floor between the states around 367, 735 and
1102 MHz of the Neo's table. While work streams, publish at least the
frequency of the first state above the base as a fraction of the top
one, from the table the firmware is given (the B curve gives the base
state and those below it no relative performance; on T6040 the loader
sets it as apple,perf-base-pstate). On the Neo that is 492 of 1470 MHz.
The idle check still takes the effort to zero after the hold.
Signed-off-by: Ryan Murray <[email protected]>
9289e4c to
19f566d
Compare
|
J616C (binned T6041, 25G83) CS2 FIFO 120 row on the three commits (module 70af018e = this head on the daily tree), against the daily (waiter rule 1) and the v1 behaviour (rule 0) on the same boot before it. Dust2 bench, 3 windows each, SoC rail median under load:
No faults or recoveries in either run. Run 2 is the expected result: CS2 never goes idle between frames, so it sits on the full-effort path and costs what the daily costs. Run 1 stayed on the graded floor (state 2) for the whole bench and never reached full effort, so it ran at half rate. Same build, same boot, two minutes apart, so the full-effort path looks like it can fail to engage. The 48 fps stuck-at-state-1 case on v1 was the same shape. I can't say yet what made run 1 different (it was the first CS2 start after boot). Happy to run a probe build if you want the effort decisions logged. |
|
Follow-up on the stuck run 1 above: I couldn't reproduce it. Five more boots, each with a CS2 FIFO 120 bench as the first CS2 start after boot (same Dust2 bench, SoC rail median under load):
No faults or recoveries. (Boot 1's first start doesn't count: CS2 quit while loading.) So the stall is 1 of 6 first starts, and I can't produce it on demand. The probe logs once a second: what each slow-path submission published, the busy-run and light-effort state, and the fast-path count. On every good run it shows the design working. While CS2 is in the map, the GPU runs 120–420 ms at a time with no 2 ms gap (busy share 60–80 %), so What still fits the stuck run is a half-rate trap at the floor. If the bench starts with the GPU on state 2 and FIFO-paced, a CS2 frame is about 13–14 ms of GPU time in a 16.7 ms slot. That leaves a gap over the 2 ms power-off delay every frame, so the busy run never reaches the 16 ms hold. FIFO queues nothing behind the running command, so the firmware doesn't raise the state either. Once at full clock, a frame leaves gaps well under 2 ms, which would explain why it's bistable. I haven't confirmed this. A synthetic paced loop (submit, wait, sleep to the next 8.33 ms tick) stayed at 120 fps on this head. If you want a guard against it, the candidate I tested is a busy share on the same timestamps: full effort once the GPU is busy at least 75 % of a 32 ms window, held until the share drops under 40 % or the run ends. That catches 13.5 ms of work in a 16.7 ms slot and leaves light paced work, like your 20-quad rows, on the floor. It has a cost on the J616C. CS2 in the map sits at 60–80 % busy, so once it latches it never drops under the 40 % release. The two runs with it on held state 10 for the whole bench, at 39.5 and 40.4 W, against 38.9–39.3 W with it off on the same boots, all at 120 fps. I'd rather not push it without a reproduction that shows it's needed. I'll keep the probe build ready and log the next stall if one shows up. |
|
One GPU recovery on the three commits (module 70af018e), J616C, about 30 minutes into the boot I used for the last CS2 run above. It happened in SCP: Secret Laboratory (Unity, Vulkan, under FEX) while spectating:
That's the same shape as the dEQP recoveries you saw on the Neo and J616s before the three commits (reason 0, no fault). I don't know yet if the commits caused it. The daily driver ran heavy SCP:SL rounds without recoveries on 20 Nov, but it's one event, and this game has had reason-0 hangs on other kernel changes before. The J616C is back on the daily driver now. If you want to reproduce it, I can put the three commits back for an SCP:SL session. |
The busy run that gives a submit-and-wait loop the full effort was one run for the whole GPU, restarted whenever a command started at least the firmware's idle power-off delay after the latest end noted so far. Commands of different clients run side by side and complete in any order: a short command of one client that starts part-way through another client's long render completes first, while the render that keeps the GPU busy through the gap has not been noted yet. Each such command restarted the run. The longer the commands, the more often that happens, so the effort can lock a GPU-bound client at the floor: on a T6041, Counter-Strike 2 capped at 120 fps on its first run after boot sat at state 2 for the whole bench at 62.6 fps and never got the full effort; the next run, started at the top state, stayed bound at 120 fps. On a T6040, a submit-and-wait client next to a second client that runs a short dispatch every 4 ms ran at 179-192 fps at state 2, against 465-489 fps at state 10 on its own. Keep a run per client (its execution context), whose own commands follow each other, so its own gaps are real. A run counts while its client is still running: until it has been silent for longer than its last command took plus the idle power-off delay, read on the system time base, which the firmware stamps commands with at its own rate. A client that stops submitting does not keep the full effort for others. With this, the T6040 client above runs at 507-511 fps at state 10 next to the second one, and paced work stays at state 2 at the same power. Signed-off-by: Ryan Murray <[email protected]>
|
Thanks for the CS2 FIFO 120 row. Run 1 is a bug in the busy run, and we can now reproduce it on the J616s without a game. Cause. The busy run was one run for the whole GPU. It restarted whenever a command started 2 ms or more after the latest end noted so far. Commands of different clients complete in any order. A short command of another client (the compositor, or anything else) that starts part-way through a long render completes first, and the render that kept the GPU busy through that "gap" hasn't been noted yet. So the run restarts. The longer the commands, the more often this happens. At state 2 the renders are about 2.5x longer, so the run never reaches 16 ms and the floor locks itself in. Started at state 10, the renders are short enough that it stays bound. That matches your run 1 vs run 2. Fix. One commit on top of this PR's head (fast-forward from J616s (T6040), same boot, arms interleaved 0/4/0/4. A = submit-and-wait client, about 2 ms renders. B = a short compute dispatch every 4 ms on its own context. 20 s per row.
The serial rows are unchanged from the 3 commits (glFinish loops at state 10, paced 60/120 Hz at state 2), with 0 GPU faults. Still to run: your CS2 FIFO 120 on the J616C with this commit, ideally twice, each the first CS2 start after a boot. If it holds, please cherry-pick it into the PR. The Neo arm waits for the Neo to come back (it has been powered off since yesterday afternoon). Reviewer detail
Assisted-by: LLM (Claude:Opus 5.5) |
|
The per-client busy run holds on the J616C (binned T6041, 25G83). Two boots, each with a CS2 FIFO 120 bench as the first CS2 start after boot. The module is the daily tree plus this PR's 4 commits plus
No stuck run, and 0 GPU faults or recoveries on either boot. It also costs about 4 W less than the 3 commits did: the GPU-wide run seems to have read CS2 as bound more often than it is, and the frame rate holds at the lower states. Power is now within 1 W of v1. I fast-forwarded the PR to |
|
Thanks for the two first-start CS2 runs and for fast-forwarding. 120 fps on both boots at 34.9 W, about 4 W under the 3 commits and within 1 W of v1, fits the cause: the GPU-wide run was read as bound or unbound according to other clients' completions, not CS2's own. Your half-rate trap (11:57). Agreed, let's not add the 75 %/40 % busy-share guard without a reproduction. It adds two thresholds and costs about 1 W on CS2. Run 1 had the cross-client cause, which our two-client probe reproduces every time on this PR's previous head. A single FIFO client trapped at the floor would be a separate case that this commit doesn't change. In the next J616s slot I'll test it directly with a FIFO-like probe: one client, about 12 ms frames at state 2 and 4.5 ms at state 10, each frame waiting for the next 8.33 ms tick. It runs once from idle and once after a full-speed burst. If it traps, I'd look at fence deadlines rather than a busy share. KMS already sets a vblank deadline on plane in-fences, and our sync-scope fences pass deadlines on to the command fences, but the command fences drop them ( SCP:SL recovery. Thanks, a session on this head is the right next row. The busy run doesn't touch the floor, so this commit shouldn't change the recovery picture either way. On our side the Neo is back. When its overnight slot ends (about 20:30 UTC), I'll run the dEQP geometry/tessellation loop that reproduced the reason-0 recoveries before the floor (7/15 runs then, 0/30 with the floor) on this head, along with the Neo rows for the per-client run. Assisted-by: LLM (Claude:Opus 5.5) |
|
SCP:SL on the full head ( |
J714s (M5 Pro, T6050, G17S) A/B row — tested on
|
| Check | Baseline (cc145705) |
Candidate (35be46ac) |
|---|---|---|
Concurrent sync kit (syncgeo.txt, 672 cases, J=4, 30 runs) |
0/30 runs with recovery (0 recoveries, 0 stops, 12000 Pass / 8160 NotSupported, 30 shard deaths, 1.64 s/run) |
0/30 runs with recovery (0 recoveries, 0 stops, 12000 Pass / 8160 NotSupported, 30 shard deaths, 1.63 s/run) |
| Vulkan submit-and-wait, 1 quad (rounds/s) | 5637.2 (2nd half 5675.3), pstate 13 100% (1620 MHz) |
5678.0 (2nd half 5692.0), pstate 13 100% (1620 MHz) |
| Vulkan submit-and-wait, 60 quads (rounds/s) | 1541.7 (2nd half 1543.3), pstate 13 100% (1620 MHz) |
1548.8 (2nd half 1549.3), pstate 13 100% (1620 MHz) |
| Vulkan submit-and-wait, 1 dispatch (rounds/s) | 6429.8 (2nd half 6361.7), pstate 13 100% (1620 MHz) |
6337.6 (2nd half 6359.3), pstate 13 100% (1620 MHz) |
GLES glFinish (Zink/Borealis), 1 quad (fps) |
5170.8 (2nd half 5167.7) |
5219.5 (2nd half 5213.0) |
GLES glFinish (Zink/Borealis), 60 quads (fps) |
1471.2 (2nd half 1480.3) |
1510.3 (2nd half 1521.0) |
| Idle | pstate [0:100%], 0 MHz, system 12.67 W |
pstate [0:100%], 5 MHz, system 10.73 W |
| Paced render 60 Hz | 60.0 fps (0 missed), [0:98% 1:1%], 17 MHz, 14.92 W |
60.0 fps (1 missed), [0:98% 1:1%], 16 MHz, 14.51 W |
| Paced render 120 Hz | 120.0 fps (0 missed), [0:98% 13:2%], 39 MHz, 19.26 W |
120.0 fps (0 missed), [0:96% 13:4%], 60 MHz, 19.63 W |
| Paced compute 60 Hz | 60.0 fps (0 missed), [0:99% 13:1%], 20 MHz, 16.90 W |
60.0 fps (0 missed), [0:97% 13:2%], 44 MHz, 17.29 W |
| Kernel GPU errors (arm window) | 0 recoveries, 0 stops, 0 faults, 0 timeouts |
0 recoveries, 0 stops, 0 faults, 0 timeouts |
- Deep sleep check on candidate (did NOT commit — test harness bug on AC): the sleep script armed a
+30 sRTC wakealarm before waiting up to ~31 s for a 1 mAh battery-gauge step; with AC connected and the battery Full (0 mA), the gauge never stepped and the alarm expired 1 s before suspend entry (apple-sleep: refused at .enter: SoC check: -16), so neither PMP nor the GPU firmware stopped (aurora: sleep refused before the commit: GPU firmware never stopped). Unrelateddwc3-appleloggedPM: device_prepare(): genpd_prepare returns -11. Actual GPU timeouts/faults/recoveries were0, and post-attempt GPU checks passed (vulkaninfolive, CTS smoke2/2, 1-dispatch submit-and-wait6447.7rounds/s, paced 60 Hz render60.0fps). - Takeaway: no stability, throughput, or power regression on J714s for
35be46acacross 30 concurrent sync runs and all 8 probes; M5'ssleep_quiet()path through an actual committed deep sleep and the new901f8cd1head remain to be tested in a rerun.
J714s (M5 Pro, T6050, G17S) A/B + deep sleep row —
|
| Check | Baseline (cc145705) |
Candidate (901f8cd1) |
|---|---|---|
Concurrent sync kit (syncgeo.txt, 672 cases, J=4, 30 runs) |
0/30 runs with recovery (0 recoveries, 0 stops, 12000 Pass / 8160 NotSupported, 30 shard deaths, 1.64 s/run) |
0/30 runs with recovery (0 recoveries, 0 stops, 12000 Pass / 8160 NotSupported, 30 shard deaths, 1.64 s/run) |
| Vulkan submit-and-wait, 1 quad (rounds/s) | 5679.3 (2nd half 5712.3), pstate 13 99% (1606 MHz), 23.04 W |
5689.3 (2nd half 5698.3), pstate 13 100% (1620 MHz), 22.27 W |
| Vulkan submit-and-wait, 60 quads (rounds/s) | 1543.0 (2nd half 1544.3), pstate 13 100% (1620 MHz), 35.69 W |
1547.5 (2nd half 1549.0), pstate 13 100% (1620 MHz), 35.79 W |
| Vulkan submit-and-wait, 1 dispatch (rounds/s) | 6569.2 (2nd half 6550.0), pstate 13 100% (1620 MHz), 28.65 W |
6455.5 (2nd half 6414.7), pstate 13 100% (1620 MHz), 28.17 W |
GLES glFinish (Zink/Borealis), 1 quad (fps) |
5183.2 (2nd half 5204.7), pstate 13 100% (1620 MHz), 25.35 W |
5191.7 (2nd half 5214.0), pstate 13 100% (1620 MHz), 25.16 W |
GLES glFinish (Zink/Borealis), 60 quads (fps) |
1478.5 (2nd half 1502.3), pstate 13 99% (1606 MHz), 36.35 W |
1515.1 (2nd half 1518.0), pstate 13 100% (1620 MHz), 36.54 W |
| Idle | pstate [0:99% 1:1%], 3 MHz, system 11.25 W |
pstate [0:100%], 5 MHz, system 9.90 W |
| Paced render 60 Hz | 60.0 fps (0 missed), [0:97% 1:2%], 14 MHz, 14.49 W |
60.0 fps (0 missed), [0:99%], 11 MHz, 14.93 W |
| Paced render 120 Hz | 120.0 fps (0 missed), [0:97% 13:3%], 56 MHz, 19.89 W |
120.0 fps (0 missed), [0:97% 13:3%], 43 MHz, 18.85 W |
| Paced compute 60 Hz | 60.0 fps (0 missed), [0:99%], 16 MHz, 17.76 W |
60.0 fps (0 missed), [0:98% 13:2%], 35 MHz, 16.66 W |
| Kernel GPU errors (test window) | 0 recoveries, 0 stops, 0 faults, 0 timeouts |
0 recoveries, 0 stops, 0 faults, 0 timeouts |
- Committed deep sleep check on candidate (PASS):
- Entered and exited
deepsleep cleanly (28.3 sasleep on a30 sRTC wakealarm, boot-object resumes0 -> 1,14coprocessors stopped, RTC wake). - GPU
sleep_quiet()/ suspend / resume path committed cleanly with no refusal or hang:aurora 2300000000.gpu: commit stop: GFX 0x1404034f,commit stop: PMP request withdrawn: 0; on wake,GPU domain after the wake: 0x1f0403ff (floor 4, saved 0x1404034f)and both RTKit endpoints re-initialized cleanly. - Post-wake GPU health:
0runtime stops across the boot,vulkaninfolive (Apple M5 Pro (G17S B1)), dEQP smoke2/2Pass, Vulkan 1-dispatch submit-and-wait9438.9rounds/s (0missed), paced 60 Hz render60.0fps (0missed). - Kernel log check across the full candidate boot and sleep window:
0GPU recoveries,0stops,0faults,0timeouts,0kernel warnings/bugs. Only pre-existing unrelateddwc3-apple 382280000.usb: PM: device_prepare(): genpd_prepare returns -11logged at suspend prepare (allapple-sleepentry idle/AUSS counters reported0 timed out).
- Entered and exited
- Verdict: PASS on
901f8cd1— no stability, throughput, or power regression on J714s across 30 concurrent sync runs and all 8 probes, and M5'ssleep_quiet()path commits and resumes cleanly across a real deep sleep.
|
Thanks for the SCP:SL session (0 recoveries in about 35 minutes on The half-rate trap exists for a client with nothing queued behind its frame. On the J616s, on Region C Suggestion: merge on the rows we have, and track the trap separately. The guard I'd want for it is a deadline, not a busy share: the trapped frame misses its vblank, and nothing else in the driver can tell that apart from paced work. Our sync-scope fences pass Rows
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review of 901f8cd1 (all 5 commits 28edd1ac..901f8cd1): No blockers — approving for joint merge.
What I checked:
- No new chip/board/firmware gates or magic constants:
active_effort()(initdata.rs:2222-2234) derives the floor directly from the firmware OPP +PerfConfigtables (first state above base / top state, 16.16 rounded up) and rejects invalid tables withEINVAL.self.m5is pre-existing layout dispatch. - Per-client busy-run tracking (
power.rs:371-457,feed.rs:461-479):BusyRunscleanly isolates concurrent clients underSpinLock<BusyRuns>(called from sleepable completion/submission paths), evicts least-recently-ended entries cleanly, clears onend_busy_run(), andasahi_g17_firmware_clock()(trace.c:113-116) usesmul_u64_u64_div_u64without overflow. - Suspend safety (
runtime/events.rs:395): adding|| self.effort.streaming()tosleep_quiet()ensures suspend waits for the idle hold to runCleareven when the published effort is zero. - Attribution & CI: all 5 commits carry human
Signed-off-byonly;host-testsCI is green. - Hardware evidence: J616C (CS2 FIFO 120 + 35 min SCP:SL), J616s (concurrent submit-and-wait + 0/30 sync stalls), and J714s (0/30 sync recoveries + committed deep sleep on
901f8cd1) all pass. Agree with tracking the single-client vsync half-rate trap as a follow-up via fence deadlines. (Our Neo T8140901f8cd1kit is also built and queued next onneohw.)
Ready to merge once unmarked from draft and Axxzy confirms.
Assisted-by: LLM (Google:Gemini 4 Neon)
Neo (J700, A18 Pro / T8140, G17P) A/B row —
|
| Check | Baseline (a84637dca209) |
Candidate (901f8cd1) |
|---|---|---|
Concurrent sync (synclist.txt, 2,940 write_image_{geometry,tess_*} cases, J=4, 10 runs) |
0/10 runs with recovery (0 recoveries, 0 stops, 0 faults, 0 timeouts, 16,800 Pass / 12,600 NotSupported, 0 deaths, 10.29 s/run) |
0/10 runs with recovery (0 recoveries, 0 stops, 0 faults, 0 timeouts, 16,800 Pass / 12,600 NotSupported, 0 deaths, 10.34 s/run) |
| Idle (20 s, skip 3 s) | 0x1b state 10 (1 rep; A2/A3 0 rep), Sys 8.22 W (A2/A3: 8.20/8.19 W), SoC PPMC 0.61 W |
0x1b state 2–3 (2 rep), Sys 8.20 W, SoC PPMC 0.61 W |
Paced render 60 Hz (f, 40 s, 3–40 s) |
60.0 fps (1 missed), p50 7.09 / p95 7.12 ms, state 10:100%, Sys 12.79 W (A2/A3: 12.77/12.70 W), SoC PPMC 4.85 W (4.80/4.76 W), PPSM 3.89 W |
60.0 fps (3 missed / 2400), p50 12.19 / p95 15.91 ms, state 3:45.5% 4:6.8% 10:47.2%, Sys 11.22 W (-1.57 W), SoC PPMC 3.33 W (-1.52 W), PPSM 2.67 W |
| Paced render 60 Hz (steady 15–40 s) | state 10:100%, Sys 12.87 W (A2/A3: 12.85/12.76 W), SoC PPMC 4.92 W (4.87/4.82 W), PPSM 3.94 W |
state 3:60.1% 4:8.9% 10:31.0%, Sys 10.70 W (-2.17 W, -16.9%), SoC PPMC 2.89 W (-2.03 W, -41.3%), PPSM 2.31 W |
Vulkan vkdep-style (4 dep dispatches + copy, 3×8 s) |
7934.7 rounds/s (2nd half 7955.3), state 10:100% |
7879.5 rounds/s (2nd half 7921.6, -0.4%), state 10:100% |
Vulkan submit-and-wait, 1 dispatch (w-d1, 8 s) |
9394.1 /s (2nd half 9397.8), state 10:100% |
9357.6 /s (2nd half 9396.8, -0.0%), state 10:100% |
GLES glFinish (Zink/Borealis), 1 quad / 60 quads (8 s) |
6432.7 / 425.4 fps (2nd half 6469.5 / 425.0), state 10:98–100% |
6296.3 / 425.0 fps (2nd half 6572.2 / 426.8), state 10:100% |
Per-client check: uncapped render w-f alone (12 s) |
136.9 fps (p50 7.20 ms), state 9–10 |
138.5 fps (p50 7.09 ms, +1.2%), state 9–10 |
Per-client check: w-f + 250 Hz d1 client (w-f-2c, 12 s) |
131.3 fps (p50 7.70 ms), state 8–10 |
132.3 fps (p50 7.60 ms, +0.8%), state 8–10 (97%) — no cross-client stall |
Per-client check: 60 Hz f + 250 Hz d1 (r60-2c, 20 s) |
60.0 fps (0 missed), p50 7.06 / p95 7.09 ms, Sys 13.00 W, state 10:100% |
59.6 fps (39 missed / 1193), p50 7.07 / p95 15.18 ms, Sys 12.77 W, state 10:89.9% / 2–4:10.1% (stepped down in final 5 s) |
gpubench c36cbbe --quick (193 rows, 20 ms warmup / 40 ms run) |
193/193 ok |
193/193 ok; heavy/RT & sustained mode=queue small submits neutral (render.heavy -1.0%, rt.rays 0.0%, copy.bw -1.5%, compute.light/render.light queue d4–d64 within ±1%); short-window procs/queues and CPU-interleaved mem.buffer/mem.image start at base state (1.0537x overall geomean) |
| Kernel GPU errors (boot + full row) | 0 recoveries, 0 stops, 0 faults, 0 timeouts |
0 recoveries, 0 stops, 0 faults, 0 timeouts |
- Notes:
- On
r60-2c, a singlefframe takes~7.1 msat state 10 (~43%of a16.67 msperiod); when the firmware stepped down to states 2–4 in the final 5 s, a few frames crossed16.67 ms(39missed / 1193), matching the single-client deadline-miss follow-up already noted above. - Verdict: PASS on Neo G17P at
901f8cd1—1.6–2.2 Wsystem (1.5–2.0 WSoC /-41%steady-state) power reduction on paced 60 Hz render, uncapped submit-and-wait and two-client per-client busy-run (w-f-2c) hold full throughput, and0/10GPU recoveries across 29,400 concurrent geometry/tessellation dEQP-VK cases.
- On
|
Moving out of draft now that the J616C, J616s, J714s, and Neo (J700) rows on Assisted-by: LLM (Google:Gemini 4 Neon) |
RyanTheTide
left a comment
There was a problem hiding this comment.
Approving at 901f8cd as our half of the joint merge decision: the per-client busy-run fix is proven on the J616s (179-192 -> 507-511 fps for a GPU-bound client beside a periodic one, paced work unchanged at state 2, 0 faults) and confirmed by Axxzy's CS2 FIFO 120 rows on the J616C, with J714s and Neo rows in. The single-client vsync half-rate trap is tracked as a follow-up (fence deadlines), as agreed.
Assisted-by: LLM (Claude:Opus 5.5)
cacf355
into
aurora-silicon:integration/aurora
|
Post-merge row on the MacBook Neo (A18 Pro, G17P): the first released kernel with this PR merged (fleet81, integration tip 1b940c26, default command line, stock module) behaves like the fix module tested on 11-21.
Assisted-by: LLM (Claude:Opus 5.5) |
The firmware takes the region C effort word (+0xe4) as a floor for its performance state. M5 already publishes none while work streams. The non-M5 G17 path (T8140, T6040, T6041) kept the full effort (0x10000) for as long as work kept arriving, and dropped it only after 16 ms without a submission. A game never leaves that gap, so the GPU sat at its top state. The firmware's own statistics show it: state 10 in every 0x1b report, while tag 0x1c's load word reads near zero on light loads.
This publishes no effort outside M5 and leaves the state to the firmware's own controller. M5's exception, the full effort while a host thread waits on a fence, isn't carried over: a game always has such a waiter, so with the exception the floor stays on. It's measured below as "M5 rule".
J616C (T6041, 25G83), CS2 offline de_dust2 fixed scene, FIFO 120, rails from SMC:
A second "before" run gave 52.5 / 40.0 / 35.0 W.
Full load:
The test build was the J616C's daily driver with a live module parameter that switched between the three behaviours, so all rows come from one boot. The patch itself passes
tools/asahi/run-host-tests.py --only g17(90/90) on integration/aurora 4e58401.T6040 shows the same stuck state on 25G83: state 10 in 99.9 % of its reports, including idle and light paced loads (Ryan's J616s capture, traces/gpu/20261121-j616s-gpudvfs-pstate). T8140 takes this path too and is untested. A Neo row would be welcome.
Follow-up commits (from review). With no floor at all, submit-and-wait clients lost up to 2x on T6040. The next commits bring back full effort only while the GPU really runs without going idle (a busy run of 16 ms or more without a 2 ms idle gap). Otherwise they keep a graded floor just above the base state, and sleeping waits let the idle check take the effort down. The last commit (
901f8cd1) keeps the busy run per client. With one GPU-wide run, another client's short command could restart the run during a long render, so the floor could lock CS2 at state 2 (62.6 fps on the J616C, once). J616C on the full head: CS2 FIFO 120 at 120 fps, SoC 34.9 W, on two boots with no faults (see the comments for the T6040 rows).Assisted-by: LLM (Anthropic:Claude Opus 5.5)