Skip to content

drm/asahi: g17: stop desktop and paced workloads from pinning CPU clocks - #3437

Open
Isaac-Duarte wants to merge 2 commits into
aurora-silicon:mainfrom
Isaac-Duarte:j714s/g17-feed-per-ctx-sustained
Open

Isaac-Duarte wants to merge 2 commits into
aurora-silicon:mainfrom
Isaac-Duarte:j714s/g17-feed-per-ctx-sustained

Conversation

@Isaac-Duarte

@Isaac-Duarte Isaac-Duarte commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

On an M5 Pro (J714s), ordinary desktop and 60/120 Hz workloads with <1% GPU load keep triggering the G17 CPU feed boost and pinning all CPU clusters at 4.38/4.61 GHz 33–74% of the time. Commit 6cfa2da1bde8 stretched the shared linger window to 20 ms — longer than both 60 Hz and 120 Hz frame periods — and a single GPU-wide streak merges unrelated DRM contexts and fires on pass count regardless of run duration.

This change tracks refill streaks per DRM context, requires an 8 ms sustained run before raising the CPU floor, and separates the 8 ms CPU-boost linger from the 20 ms GPU-bound wait-hint linger so idle/paced frames drop back to low clocks while sustained refill-bound work still boosts.

Tested: J714s M5 Pro (G17S, docked 3x1080p165) at bca9f35f5819: boots cleanly, 0 failed units; matched quiet-desktop A/B cuts desktop boost 33.15% -> 0.14% (PSTR 13.86 -> 13.03 W, PHPC 5.83 -> 4.81 W), paced 60/120 Hz boost 99.62%/99.75% -> 0.64%/0.00% (PSTR 15.29/16.91 -> 14.91/15.46 W), and gpu_bound boost 48.21% -> 0.00% (PSTR 33.49 -> 30.47 W, +1.6% throughput), while refill_d1 stays at 98.50% boost (6240.5 sub/s); host tests 250/250 pass, KUnit asahi_g17_feed_detector 12/12 pass.

Risk: two-way · M5, M5 Pro, M5 Max (G17S/G17P/G17C/G17D); a plain revert restores the previous detector.

Not yet: Other G17 Macs beyond J714s M5 Pro (G17P, G17C, G17D).

Details

Three interactions in the existing G17 feed detector kept clocks pinned during light workloads:

  1. Commit 6cfa2da1bde8 ("drm/asahi: g17: provide syncobj wait hint on GPU-bound streams") raised the shared LINGER_NS constant from 8 ms to 20 ms so bound_until covers a full 60 Hz frame. That also stretched the CPU-floor deadline (until) past both 60 Hz (16.67 ms) and 120 Hz (8.33 ms) frame periods, continuously renewing the CPU floor across idle frames.
  2. A single GPU-wide last_end/streak merged unrelated DRM contexts (compositor, browser, video player), chaining 1–3 ms per-client bursts across each other without resetting streak.
  3. STREAK_ON = 8 fired on pass count alone regardless of elapsed run duration, so short multi-pass UI redraws raised the CPU floor for 20 ms.

Changes:

  • Per-context tracking (Tracker): Moved interval history into a 16-slot LRU Tracker under its own leaf SpinLock<Tracker>, updated in Feed::note_pass(context, start, end) after fence signalling (off the wakeup critical path), while keeping Detector lock-free. Both completion.rs call sites (compute and render fragment) pass self.context_id.
  • Separate linger windows: Split LINGER_NS into FEED_LINGER_NS = 8_000_000 (8 ms for until) and BOUND_LINGER_NS = 20_000_000 (20 ms for bound_until).
  • Sustained-run gate: Require a per-context run spanning at least FEED_MIN_RUN_TICKS = CLOCK_HZ / 125 (8 ms) before emitting Sample::RefillBound.
  • Parallel wave & arithmetic safety: Measure gpu_idle globally via global_last_end while crediting actual end - start busy duration on partially overlapping parallel waves (start < global_prev && end > global_prev), drop fully subsumed intervals (end <= global_prev), use saturating arithmetic in decay_add and Detector::record, keep until/bound_until monotonic with fetch_max, and align SeqCst wake handoff between Detector and Feed::run.
  • Host/KUnit tests: Adds tools/asahi/g17-feed-burst-tests.py (distinct filename from #3251's g17-feed-tests.py) with 7 mutations (no-min-run, single-context, per-ctx-gap, shared-linger, short-bound-linger, count-subsumed, clip-overlap), plus 7 new KUnit subtests in asahi_g17_feed_detector.
Evidence

PR head SHA: bca9f35f581962fb6a0f9469af2bfa02bfb233b7 (parent 9af21b00742595424728ac19cc887a455d1e3922)

1. Matched Quiet-Desktop A/B on J714s M5 Pro (G17S)

Hardware setup: 14-inch M5 Pro (J714s), kernel 7.3.0-124e30a (with this exact feed.rs + completion.rs diff compiled in for patched), docked to 3x1080p165 monitors, AC connected, balanced profile, quiet desktop (KWin + Brave). Stock (65bc2ed84827bb61) vs patched (eff6d453cd857cfd) across separate boots:

Workload policy12 boost % policy12 max freq % policy12 / policy0 avg MHz PSTR mean (med) PHPC mean Throughput (p50)
desktop (15 s) 33.15% -> 0.14% 34.89% -> 0.93% 1869.5 / 2404.9 -> 572.0 / 1376.8 13.86 (13.23) -> 13.03 (12.82) W 5.83 -> 4.81 W gpu_busy 0.19% -> 0.00%
Vulkan paced60 99.62% -> 0.64% 99.62% -> 0.74% 4592.0 / 4370.6 -> 492.1 / 1426.8 15.29 -> 14.91 W (-0.38 W) 6.85 -> 6.45 W 1203.7 -> 1203.3 sub/s
Vulkan paced120 99.75% -> 0.00% 100.00% -> 0.12% 4608.0 / 4372.7 -> 495.7 / 1440.0 16.91 -> 15.46 W (-1.45 W) 8.47 -> 6.92 W 1442.1 -> 1441.8 sub/s
Vulkan gpu_bound (d4) 48.21% -> 0.00% 48.93% -> 0.33% 2602.3 / 2930.3 -> 584.1 / 1649.4 33.49 (36.42) -> 30.47 (34.12) W 22.60 -> 20.13 W 624.3 -> 634.3 sub/s (+1.6%)
Vulkan refill_d1 (d1) 99.32% -> 98.50% 99.67% -> 99.17% 4602.8 / 4369.7 -> 4596.9 / 4345.2 21.60 (23.04) -> 20.30 (22.01) W 12.59 -> 11.70 W 6241.3 -> 6240.5 sub/s (153.4 -> 154.0 us)

(0 failed systemd units and clean dmesg / aurora init after boot on the patched module.)

2. Offline Ftrace Replay (Compiled Rust Tracker + Detector)

  • 3 s stock busy-desktop ftrace (4,061 completions): refill triggers drop from 1,435 (72.5% active) to 0 (0.00% active), bound_hits=34.
  • Live depth-4 gpu_bound ftrace (1,467 completions): refill=0, bound=818.

3. Host Tests & KUnit

  • Host & mutation tests (RUSTUP_TOOLCHAIN=1.96.0 HOSTRUSTC=rustc python3 -I tools/asahi/run-host-tests.py --only g17 --jobs $(nproc)): 250/250 passed in 6s (all 7 g17-feed-burst-tests mutations killed with exit code 101).
  • arm64 QEMU KUnit (./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/gpu/drm/asahi/.kunitconfig --timeout=600 asahi_g17_feed_detector): Ran 12 tests: passed: 12.

@Isaac-Duarte
Isaac-Duarte requested review from a team and DjDeveloperr as code owners November 27, 2026 20:42
@Isaac-Duarte Isaac-Duarte changed the title drm/asahi: g17: require sustained per-context runs for CPU feed boost drm/asahi: g17: stop desktop and paced workloads from pinning CPU clocks Nov 27, 2026
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merge readiness at d9c35e61: not ready yet

Check Detail
CI at head ok 3 checks passed
Review no approved by RyanTheTide, but GitHub does not count it yet (code owner from Core or Omarchy Mac needed, or approval went stale)
Requested changes no requested by erikwb
Hardware row at head no no line with the head SHA d9c35e61, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · M5, M5 Pro, M5 Max (G17S/G17P/G17C/G17D); a plain revert restores the previous detector.

Areas: area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@Isaac-Duarte

Copy link
Copy Markdown
Contributor Author

Follow-up #3075 gpubench vk/gl soak + multi-process per-context check at head bca9f35f5819:

Machine & build: J714s (MacBook Pro 14-inch M5 Pro, G17S B1), balanced profile, AC 100%, docked 4 displays (DP-2, DP-4, DP-6 @ 1920x1080 + eDP-1 @ 3024x1964); 7.3.0-124e30a.j714s.fc44.aurora.aarch64 #5 (loaded aurora.ko sha256 ba25e6770ea14967, built with g17/feed.rs and g17/completion.rs byte-identical to bca9f35f5819; also carrying #2302/#2516, #3293, #3294, and shared T6050 CLPC DTB), Borealis Mesa 26.3.0-devel git-d4ad4a4dce, gpubench 15b1aa4.

  • 8-loop gpubench vk + gl soak (#3075): 56/56 gpubench-vk (compute.light, compute.heavy:bw, copy.bw:buf2buf, render.light:tri, render.heavy:fill/1080p, render.heavy:texture/1080p, idle.wake:20ms), 32/32 gpubench-gl (asahi), 32/32 gpubench-gl (zink) — 232/232 result rows status=ok, 0 failures, 0 timeouts.
  • Short-lived Vulkan clients: 12/12 fresh sequential gpubench-vk clients status=ok, 0 failures.
  • Concurrent multi-process contexts (--mode procs --depths 4, per-context Tracker): compute.light (15,831 submits across 4 procs, 25.27 us/submit, gpu_us 3.25) and render.light:tri (9,410 submits across 4 procs, 42.51 us/submit, gpu_us 6.29) both status=ok.
  • gpubench-stress-vk --test idle.wake,render.first,life.churn --duration 30 --kernel-log: 3/3 PASS (idle.wake 1,152 iters, render.first 93 iters / 17 devices / 0 late frames, life.churn 3,778 iters / 670 devices), 0 errors.
  • CPU floor release & kernel log: policy0, policy6, policy12 scaling_min_freq all returned cleanly to 300000 kHz post-soak, all 4 displays stayed connected / enabled, and dmesg logged 0 new lines (0 GPU/CLPC/DCP/DRM errors).

satchlj
satchlj previously approved these changes Nov 28, 2026

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and host-tested at exact HEAD bca9f35f5819:

  • Code review: moving per-context refill tracking into Tracker under its own spinlock (called post-signalling off the wakeup path, never nesting with requests), gating RefillBound on both STREAK_ON and FEED_MIN_RUN_TICKS (8 ms), and decoupling FEED_LINGER_NS (8 ms) from BOUND_LINGER_NS (20 ms) cleanly fixes desktop/paced-frame CPU clock pinning while preserving GPU-bound wait hints.
  • run-host-tests.py --only g17: 250/250 passed in 4 s.

@RyanTheTide

Copy link
Copy Markdown
Contributor

bca9f35f5819 (aurora-silicon/linux#3437) J700 (MacBook Neo, T8140 / G17P B1) guarded one-shot (7.3.0-aurora-pr3437+, default cmdline) PASS:

  • Host Rust unit tests: 250/250 PASS.
  • Boot & health: Enforcing, 0 failed units, 0 AVC denials (matching baseline 7.3.0-aurora-fleet89), 0 GPU/DART faults ([drm] Initialized aurora 1.0.0 for 482600000.gpu), /lib symlink intact.
  • Idle CPU frequency (20 samples @ 0.5s, default governor):
    • Baseline 7.3.0-aurora-fleet89: policy0 avg 909.0 MHz (min=744, at_max=1/20), policy1 avg 1090.2 MHz (min=816, at_max=2/20).
    • Patched 7.3.0-aurora-pr3437+: policy0 avg 909.0 MHz (min=744, at_max=1/20), policy1 avg 1090.2 MHz (min=816, at_max=2/20) (no idle clock pin).
  • GPU clock/power gate:
    • 8/8 gpubench-vk soak loops PASS (render.bindless_ubo mode=desc_buf + copy.bw buf2buf d=1,4, status: ok every loop; mid-soak policy1=1788 MHz).
    • 10/10 fresh short-lived Vulkan clients PASS (dEQP-VK.api.smoke.* 8/8 each, MemoryMax=3G, 0 timeouts).
    • GL/Zink smoke OK (eglinfo -B: zink Vulkan 1.4(Apple A18 Pro (G17P B1) (AURORA_BOREALIS))).
    • Post-workload idle recovery clean (policy0 min=744 MHz, policy1 min=816 MHz).
  • s2idle: 1/1 PASS (rtcwake -m freeze -s 10, suspend_stats/success 0 -> 1), post-s2idle Vulkan smoke 8/8 PASS.
  • Restore: Restored to saved 7.3.0-aurora-fleet89 (next_entry empty, Enforcing, 0 failed units, trial kernel/modules/initramfs/BLS removed).

Evidence: traces/gpu/20261128-peer-rows-linux3437-bca9f35f-neo/.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Nov 28, 2026
@Isaac-Duarte
Isaac-Duarte force-pushed the j714s/g17-feed-per-ctx-sustained branch from bca9f35 to 98ebb21 Compare November 28, 2026 15:23
@Isaac-Duarte

Copy link
Copy Markdown
Contributor Author

@satchlj @RyanTheTide Rebased onto main (a81a12c7de36) at 98ebb21e59fc to resolve conflicts with #2393 and #3428.

Rebase summary

  • drivers/gpu/drm/asahi/g17/feed.rs: integrated Policy (Policy::DEFAULT / Policy::M5), runtime Tracker::new(counter_hz) scaling (MAX_REFILL_PER_SEC and FEED_MIN_RUN_PER_SEC = 125, keeping the counter_hz == 0 guard in Tracker::note()), and gpu_bound_rx_util_min().
  • tools/asahi/run-host-tests.py & tools/asahi/g17-feed-burst-tests.py: preserved drm/asahi: g17: batch report-ring drains and skip redundant render re-observe #3428's g17-report-drain-tests.py entry and updated the host test suite for Tracker::new(CLOCK_HZ), MAX_REFILL_PER_SEC / FEED_MIN_RUN_PER_SEC, and Tracker::new(0).

Verification at 98ebb21e59fc

  • python3 tools/asahi/run-host-tests.py --only g17: 255/255 passed (including g17-feed-burst-tests and all 7 mutation checks).
  • ./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/gpu/drm/asahi/.kunitconfig: asahi_g17_feed_detector 13/13 passed (including zero_counter_hz_never_detects_refill_or_bound); 508 passed, 4 skipped of 512 total (4 skipped are unrelated non-feed tests).
  • make LLVM=1 ARCH=arm64 drivers/gpu/drm/asahi/ (local 7.3.0-124e30a config, CONFIG_CPU_FREQ=y, CONFIG_UCLAMP_TASK=y): built cleanly with 0 warnings in feed.rs.
  • scripts/checkpatch.pl --strict --no-tree: 0 errors (1 advisory MAINTAINERS warning for adding tools/asahi/g17-feed-burst-tests.py).

(Note: the earlier J714s and J700 hardware results in the thread were measured at pre-rebase bca9f35f5819, whose G17S detector behavior is unchanged.)

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 98ebb21e (wait for queued CI to finish green before merging)

Blockers: none

Checked:

  • Audited drivers/gpu/drm/asahi/g17/completion.rs, drivers/gpu/drm/asahi/g17/feed.rs, tools/asahi/g17-feed-burst-tests.py, and tools/asahi/run-host-tests.py after the rebase onto main (#2393 + #3428):
    • Per-context tracking (Tracker): 16-slot LRU table under its own leaf SpinLock<Tracker> (released before Detector::record() — never nested with requests mutex or runs spinlock). Runtime Tracker::new(counter_hz) cleanly preserves #3428's counter_hz == 0 guard (max_refill_ticks == 0 returns Sample::None), while global_last_end measures true GPU idle gaps, credits full end - start on overlapping parallel waves, and drops fully subsumed intervals (end <= global_prev).
    • Sustained-run gate & split linger: requires STREAK_ON (8) AND last_end - run_start >= min_run_ticks (8 ms) per context before emitting Sample::RefillBound, and decouples FEED_LINGER_NS (8 ms) from BOUND_LINGER_NS (20 ms) while preserving Policy::DEFAULT / Policy::M5 and gpu_bound_rx_util_min().
    • Concurrency & overflow safety: Detector::record() uses saturating addition + monotonic fetch_max and SeqCst wake handoff paired with wanted().
  • Verified exact-head 98ebb21e59fc offline checks: run-host-tests.py --only g17 255/255 PASS (all 7 mutations killed), arm64 QEMU KUnit asahi_g17_feed_detector 13/13 PASS (zero_counter_hz_never_detects_refill_or_bound included), arm64 LLVM=1 build 0 warnings, checkpatch.pl --strict 0 errors.
  • Verified prior hardware rows (bca9f35f5819, unchanged G17S detector behavior): J714s M5 Pro matched quiet-desktop A/B (desktop boost 33.15% -> 0.14%, paced60/120 99.6%/99.8% -> 0.6%/0.0%, gpu_bound 48.2% -> 0.0% +1.6% throughput, refill_d1 sustained at 98.5%) and J700 MacBook Neo one-shot boot PASS.
Evidence
  • Risk: two-way · M5, M5 Pro, M5 Max (G17S/G17P/G17C/G17D) present.
  • All 21 queued CI jobs (apple-build, host-tests, pr-text, readiness, KUnit suites) pending at 98ebb21e.
  • Minor body nit (non-blocking): refreshing bca9f35f5819 in the top **Tested:** line to mention the 98ebb21e59fc rebase checks makes exact-head readiness immediately scannable.

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at 98ebb21e. The App approved this head (NEON-PR-REVIEW2). The rebase changed code around #2393 and #3428, and the J714s A/B and J700 boot rows predate it. One short boot plus GPU smoke at 98ebb21e on a G17 Mac (J700 or J714s) closes it; it merges under the 6-point rule after that and green CI, unless you object.

@github-actions github-actions Bot added needs-review No approving review from Core or Omarchy Mac yet (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 28, 2026

@erikwb erikwb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH, then merge at 98ebb21e59fc

Blockers:

  1. drivers/gpu/drm/asahi/g17/feed.rs:190 resets the streak before it can renew the GPU-bound wait hint when busy contexts alternate. Feed it 40 contiguous 3 ms passes alternating between two contexts. The GPU never goes idle, but each context waits 3 ms between its own passes, trips the 2 ms reset, and never returns GpuBound. The base classifies the same sequence as GPU-bound and Feed::wait_hint() supplies a hint. Keep the device-wide GPU-bound streak and use the per-context streak for CPU-floor requests. Extend the alternating-client test past the 2 ms cutoff.

Checked: Host tests, build, and KUnit passed at this head, and GitHub reports no merge conflicts. The tracker adds no runtime tunable or hardware gate. The J714s A/B and J700 regression runs both predate the rebase that changed code. The current-head comment cited for readiness asks for a hardware run. Please attach results from the revised head on the affected M5 path and a second G17 Mac. Hardware run request

Evidence
  • Ran the base and head detector code with the same timestamp stream. At 1 ms per alternating pass both report GPU-bound, as in the new test. At 2 and 3 ms the base still reports GPU-bound and the head loses the hint. Neither requests a CPU floor.
  • The tracker uses a leaf lock after fence signalling. The deadline update and worker handoff remain atomic. The 8 ms and 20 ms constants set scheduling policy, and the run threshold scales with the counter rate passed to the tracker.
  • Two follow-up cases for the hardware row. On G17P, logical queues in one VM can share the execution ID used as the tracker key (runtime.rs:1445, completion.rs:541), so this isolates execution contexts and can still combine queue histories. A synthetic 120 Hz stream of eleven 5 µs passes spaced 650 µs apart also keeps the floor requested across frames after the first frame, because the inter-frame gap is only 1.83 ms. The posted paced tests show the improvement for their workload.

@github-actions github-actions Bot added the changes-requested A reviewer requested changes (bot) label Nov 29, 2026
On M5 Pro (J714s / T6050), ordinary desktop, browser, and video
workloads with <1% GPU utilization trigger the G17 CPU feed detector
and pin all CPU clusters at 100% max frequency (~4.38 GHz / ~4.61 GHz)
~33-74% of the time. Three interactions cause this:

1. Commit 6cfa2da ("drm/asahi: g17: provide syncobj wait hint on
   GPU-bound streams") raised the shared LINGER_NS constant from 8 ms to
   20 ms so bound_until covers a full 60 Hz frame. That also stretched
   the CPU-floor deadline (`until`) to 20 ms, longer than both 60 Hz
   (16.67 ms) and 120 Hz (8.33 ms) frame periods, so periodic frame
   bursts continuously renew a 100% CPU frequency floor across idle
   frames.

2. A single GPU-wide `last_end`/`streak` merges unrelated DRM contexts
   (e.g., compositor, browser, video player). Staggered paced clients
   whose individual bursts last 1-3 ms chain across each other into
   30-80+ pass global bursts without resetting `streak`.

3. `STREAK_ON = 8` fires on pass count alone regardless of elapsed run
   duration, so a short multi-pass UI redraw raises the CPU floor for
   20 ms.

Track refill-bound streaks per DRM context in a 16-slot LRU `Tracker`
under its own spinlock (updated in `Feed::note_pass(context, start,
end)` after fence signalling, off the wakeup critical path) while
keeping `Detector` deadline/worker state lock-free with monotonic
saturating `fetch_max` deadlines and `SeqCst` wake handoff:
- Split `LINGER_NS` into `FEED_LINGER_NS = 8_000_000` (8 ms for `until`)
  and `BOUND_LINGER_NS = 20_000_000` (20 ms for `bound_until`).
- Scale `Tracker::new(counter_hz)` thresholds from `Feed`'s firmware
  command timestamp rate (disabling detection when `counter_hz == 0`)
  and require a sustained per-context run spanning at least
  `FEED_MIN_RUN_PER_SEC` (`counter_hz / 125`, 8 ms) before emitting
  `Sample::RefillBound` so transient frame bursts stay unboosted.
- Measure `gpu_idle` against `global_last_end` while crediting actual
  busy duration on partially overlapping parallel waves (`start <
  global_prev && end > global_prev`), drop fully subsumed intervals
  (`end <= global_prev`), and use saturating arithmetic in `decay_add`.
- Keep the GPU-bound streak device-wide, as before: busy contexts that
  alternate each wait longer than a refill gap between their own passes
  while the GPU never idles, so per-context streaks alone would drop the
  syncobj wait hint. Per-context streaks only gate CPU-floor requests.

Validation (rebased onto main across aurora-silicon#2393 Policy/counter_hz and aurora-silicon#3428):
- Host tests (`run-host-tests.py --only g17`, Rust 1.100.0): g17 host tests
  pass, including `g17-feed-burst-tests.py` and all 8 mutations.
- KUnit (`arm64` QEMU, `KUnit asahi`): `asahi_g17_feed_detector` 13/13
  pass (including `zero_counter_hz_never_detects_refill_or_bound`).
- Full driver build (`LLVM=1 ARCH=arm64 drivers/gpu/drm/asahi/`): passes
  with `CONFIG_CPU_FREQ=y` and `CONFIG_UCLAMP_TASK=y`.
- Hardware rows (run on earlier identical detector logic prior to main
  aurora-silicon#2393 Policy refactor): J714s M5 Pro (`7.3.0-124e30a`) quiet-desktop
  A/B (`policy12` boost 33.15% -> 0.14%, `paced60/120` 99.6%/99.8% ->
  0.64%/0.00%, `gpu_bound` 48.2% -> 0.00%, `refill_d1` 98.5%), 8-loop
  `gpubench` vk/gl soak (232/232 ok, 12/12 fresh VK clients,
  `gpubench-stress-vk` 3/3 pass); J700 MacBook Neo (`G17P`) peer row
  (8/8 `gpubench-vk` soak, 10/10 fresh VK clients, `s2idle` pass).

Fixes: 6cfa2da ("drm/asahi: g17: provide syncobj wait hint on GPU-bound streams")
Signed-off-by: Isaac Duarte <[email protected]>
@Isaac-Duarte
Isaac-Duarte force-pushed the j714s/g17-feed-per-ctx-sustained branch from 98ebb21 to dd90b7d Compare November 30, 2026 02:21
@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at dd90b7d8e40a

Blockers:

  • Hosted CI workflows for this fork head (dd90b7d8e40a) have not yet run (apple-build, host-tests, KUnit asahi, and pr-text need to be approved/run and finish green).
  • Exact-head hardware verification at dd90b7d8e40a on a G17 Mac (e.g., J714s or J700 boot + GPU smoke) is still pending because both the J714s A/B and J700 rows predate the 98ebb21e rebase and the dd90b7d8 device-wide GpuBound fix in drivers/gpu/drm/asahi/g17/feed.rs.
  • Requires @erikwb to verify/clear the prior CHANGES_REQUESTED review from 98ebb21e before merge.

Checked:

  • drivers/gpu/drm/asahi/g17/feed.rs (Tracker::note()): verified @erikwb's 98ebb21e alternating-client blocker is cleanly fixed — Tracker now maintains device-wide global_idle, global_busy, and global_streak, computes device-wide bound (Sample::GpuBound when global_streak >= STREAK_ON && global_idle * 4 < global_busy), and returns bound both when a context hits its per-context paced reset (start >= slot.last_end + max_refill_ticks) and when the per-context sustained-run refill gate does not fire. Alternating 2 ms and 3 ms saturated passes now renew bound_until continuously without triggering CPU-floor boosts, while interleaved short paced bursts stay quiet (global_idle * 4 >= global_busy).
  • Verified drivers/gpu/drm/asahi/g17/completion.rs passes self.context_id at both feed.note_pass() sites, lock ordering (SpinLock<Tracker> released before lock-free Detector::record()), counter_hz == 0 guard, and KUnit + tools/asahi/g17-feed-burst-tests.py coverage (including alternating_saturated_clients_stay_gpu_bound at 1/2/3 ms and the new per-ctx-bound mutation check).
  • Policy & attribution: human Signed-off-by and Fixes: 6cfa2da1bde8 present, MERGEABLE on main, no runtime tunables or board/SoC gates, no Apple material or AI attribution.
Evidence
  • Head: dd90b7d8e40ab6c6c6a6838e88bb3ffe72bf2aa1 (base: main, MERGEABLE, +970/-119, 4 files, 1 commit).
  • Local verification reported at dd90b7d8: run-host-tests.py --only g17 (including all 8 mutations), KUnit asahi_g17_feed_detector 13/13, and LLVM=1 ARCH=arm64 drivers/gpu/drm/asahi/ build PASS.

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Nov 30, 2026
Resolve the host-test registry: keep both the feed-burst tests from this branch and the loader-OPP tests from main.

Signed-off-by: DjDeveloperr <[email protected]>

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at d9c35e61d4c2

Blockers:

  • Hosted CI workflows (apple-build, host-tests, KUnit asahi, pr-text) have not yet executed on this fork head (d9c35e61d4c2; currently SKIPPED while readiness is queued) — wait for CI to be dispatched and complete green.
  • Exact-head G17 hardware smoke row (J714s or J700 boot + GPU workload check) at dd90b7d8/d9c35e61d4c2 (the existing J714s A/B and J700 rows predate the 98ebb21e rebase and the dd90b7d8 device-wide GpuBound streak fix) plus clearing the prior CHANGES_REQUESTED review from 98ebb21e.

Checked:

  • Audited merge commit d9c35e61d4c2 (MERGEABLE against main): cleanly resolves the tools/asahi/run-host-tests.py registry conflict, keeping both g17-feed-burst-tests.py and the loader-OPP tests from main.
  • Confirmed the 4-file diff (drivers/gpu/drm/asahi/g17/completion.rs, drivers/gpu/drm/asahi/g17/feed.rs, tools/asahi/g17-feed-burst-tests.py, tools/asahi/run-host-tests.py, +970/-119) preserves the audited dd90b7d8 per-context CPU-boost tracking + device-wide GpuBound streak fix without introducing regressions.
Evidence
  • Head: d9c35e61d4c227a86e24175603070a4fec7ed240 (base main, MERGEABLE).
  • Status checks at review time: readiness / readiness QUEUED; fork checks SKIPPED.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the conflict-pass merge commit d9c35e6 only: run-host-tests.py keeps both entries (adds g17-feed-burst-tests). The resolution keeps what each side had and adds nothing outside the conflict. Approved for the merge-up; merging still waits on CI and the rows at this head.

@github-actions github-actions Bot removed the merge-conflict Conflicts with the base branch (bot) label Dec 1, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at d9c35e61d4c2

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: - Audited merge commit d9c35e61d4c2 (MERGEABLE against main): cleanly resolves the tools/asahi/run-host-tests.py registry conflict, keeping both g17-feed-burst-tests.py and the loader-OPP tests from main.

  • Confirmed the 4-file diff (drivers/gpu/drm/asahi/g17/completion.rs, drivers/gpu/drm/asahi/g17/feed.rs, tools/asahi/g17-feed-burst-tests.py, tools/asahi/run-host-tests.py, +970/-119) preserves the audited dd90b7d8 per-context CPU-boost tracking + device-wide GpuBound streak fix without introducing regressions.

Follow-ups (not blocking): fork CI dispatch; G17 smoke row; prior CR on 98ebb21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) changes-requested A reviewer requested changes (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants