Repository navigation
Description
Joshua Warren’s candidate allows firmware preemption by default on G14X and adds compute_preempt. He reports correct concurrent animation/compute on M2 Max, with roughly1% decode difference inside run-to-run spread. Forcing the same path on M1 MoE workloads costs about12–20%, so M1 defaults must stay unchanged. The original .13 release predates automatic M2 Max selection; .14 includes the author-preserving implementation in #68.
Priority: P1 · Readiness: needs-retest · Implementation owner: kernel
Baseline: Aurora 2026.10.11.14, kernel source 7cae5a72ccc6690a710e199c853f8e1c97a3d86c. Earlier reproductions retain the exact versions above.
Code: drivers/gpu/drm/asahi/asahi.rs · drivers/gpu/drm/asahi/workqueue.rs
Completion criteria: Review exact generation/default/module-parameter dispatch and firmware priority fields. Compile the affected ARM64 Rust driver and test concurrent compute plus compositor correctness, cancellation and teardown. Preserve G13 and M3/HAL200 defaults. Complete repeated output-digest, throughput, cancellation and teardown qualification on named hardware before broadening automatic selection beyond M2 Max.
Original reports/candidate: original #137
This ticket carries forward the remaining work; source inclusion, release delivery and hardware acceptance are recorded separately.
Original PR #16 is closed as superseded by the author-preserving #68. M2 Max (0x6021/G14X) is selected automatically; M2 Pro/Ultra retain explicit opt-in pending qualification. M1 and M3/HAL200 defaults remain unchanged.
Implementation progress: Merged author-preserving M2 Max automatic preemption in #68, retaining Debug0 and explicit overrides. Focused ARM64 build and independent policy controls pass; Pro/Ultra and longer hardware qualification remain open. Delivered in Aurora 2026.10.11.14. Named hardware acceptance below remains open.
Launch placement: Focused launch qualification in #72. Reuse unchanged passing evidence; check only the missing profile or newly changed path. Broader board/accessory permutations remain follow-ups. Roadmap: #56.
Activity
chriskearney commentedon Oct 11, 2026
Merged Joshua’s candidate through #68. Automatic compute preemption is enabled on M2 Max; the existing Debug0 opt-in is retained, and explicit
compute_preempt=0/1wins. Pro/Ultra remain explicit opt-in targets. M1 defaults and M3 HAL200 queues are preserved.The ARM64 Asahi object compiles, 12,960 compiled policy/priority combinations pass, and independent review accepts the source. Joshua’s M2 Max hardware evidence remains in #16; no new Pro/Ultra or teardown qualification is claimed. Queued for the next release; .13 is unchanged. Keeping this tracker open for the remaining hardware qualification.
[-]G14X compute preemption: review candidate while preserving M1 throughput and M3 queues[/-][+]G14X compute preemption: qualify merged M2 Max default and broader hardware[/+]joshuaswarren commentedon Oct 11, 2026
M2 Max verification of the release aurora-2026.10.11.14, for the GPU part of this ticket.
Machine and boot. A 14-inch MacBook Pro with the M2 Max (G14C B1). One boot of the release kernel
7.1.12-2-20261011.14-sep-ARCH(vmlinuz sha256f3e39a3fc581a00658d837332dfbe0ca442df74e4b2cedbff60016dc6bb03ecf, from the release package, sha256ea2dd7b92f90ddc4411932b5fff25ac1209509ddfb2986222ee5ee3bfe15d9be). The command line has noasahi.word at all, checked before and after the tests. Mesa 26.3.0-devel (Honeykrisp). Not a full user update: our m1n1 stayed at aurora14, and the initramfs and boot image were built by hand from the release kernel. The release kernel has no compute-preempt log line, so the proof below is behavioural.Animated-window test. One animating Chromium page beside one compute dispatch at a time, 4 animated runs per arm, each compared with the hash of a run without the page.
There were 0 GPU timeouts, 0 display fence waits, 0 hung tasks and 0 "GPU is crashed" lines, counted with
journalctl -kfor the whole boot. The earlier stock kernel gave wrong results and 39 to 120 GPU timeouts per minute on the same test. These numbers equal the ones from our boots withasahi.debug_flags=281474976710656(86.6, 87.0 and 83.3 fps).Decode cost. gemma-4-26B-A4B on MLX, same build and driver, with the ANE idle, package and v3 Vulkan drivers interleaved 3 times:
The package over v3 ratio is 1.124. On the earlier flag boot it was 1.119. The v3 median is 2.9 percent below the 10.90 of the earlier flag block (the mean is 3.1 percent below), 1.1 percent above the stock kernel's 10.47, and inside the 7.4 percent range of our v3 control rows that day (10.13 to 10.91). So the cost is not separable from run-to-run drift.
ANE. The release kernel's own
ane_t6021module loaded and ran one 60 s iteration of a 449 MB encoder program: 237 calls, median 253.4 ms, output bit-exact against the reference, no new ANE or DART lines in the kernel log.Not tested. M2 Pro and M2 Ultra (no hardware), a repeat boot or a second harness run, a negative control with
compute_preempt=0(it wedges this machine), and the M1 and M3 defaults, which this check does not touch.scottjones commentedon Oct 11, 2026
Second M2 Max check of aurora-2026.10.11.14, this time on a full user install. Compute beside the compositor passed: 191 of 191 runs correct, no GPU timeouts or faults. Killing a client mid-dispatch caused one GPU timeout, which recovered.
Thanks Josh for the change. The concurrent results match yours above, now with the packaged m1n1 and Mesa.
Setup. 14-inch MacBook Pro, M2 Max (J414c, G14C B1), system firmware 26.6.2. Installed with the release one-liner:
linux-aurora 7.1.12.aurora2-20261011.14(vmlinuz sha256f3e39a3fc581a00658d837332dfbe0ca442df74e4b2cedbff60016dc6bb03ecf, same as yours),m1n1-aurora 1.6.1.aurora17-5, Mesa 26.2.4 from the package. Noasahi.word on the command line, socompute_preemptis at its default (auto, on for t6021).Probe. One
vkCmdDispatchover 4,194,304 invocations, each an integer LCG + xorshift chain, calibrated to a target length. Each run zeroes the buffer, then checks 4096 CPU-computed elements and an FNV-1a hash of the whole buffer against the alone runs. Load isvkcubeon the 120 Hz internal display (113.4 fps alone).Compute beside the compositor
0 GPU timeouts, 0 GPU faults and 0 hung tasks in every arm, alone and beside.
Kill mid-dispatch
The plan was 10 SIGKILLs mid-dispatch, 3 during readback and 3 normal exits with work in flight, all with vkcube running. The script stops at the first GPU timeout, so only the first kill ran: SIGKILL 260 ms after submit, into a 700 ms dispatch.
Result: 1 GPU timeout, recovered. 0 separate faults, 0 hung tasks, 0 failed recoveries. The unmapped-page fault below is part of the timeout report, not a separate event.
After that: no
Cannot recover,GPU is crashed, scheduler timeout or hung task, and no further asahi lines in the kernel log. The killed process was reaped (nothing left in D state), the next client's 50 ms run matched the reference hash, and vkcube kept running.My reading of the source, not confirmed on hardware. This looks like the existing teardown path rather than the priority change.
QueueJob::cancelonly logs, so the dispatch keeps running in firmware after the client's VM is unbound. Its read of an unmapped page faults the GPU,handle_timeoutmarks the pending event failed, andrecover()clearshaltedand setsresume, so the firmware is resumed with no GPU reset.cancelis byte-identical in the 11.31 build I ran before (iconidentify/aurora-linuxsep-7.1.12.aurora2-11.31, 87e165c), and #68 doesn't touch the teardown code. One caveat: on t6021 the queue being torn down now has preemption on, so the firmware state teardown leaves behind isn't the same as before, even though the code is. I haven't run the same kill on 11.31 or with compute preemption off, so I can't say whether preemption changes whether or how often this happens.Not tested. The other 9 mid-dispatch kills, the readback kills and the in-flight exits; repeated teardown; a
compute_preempt=0comparison; M2 Pro and Ultra.joshuaswarren commentedon Oct 12, 2026
Kill-mid-dispatch arm on our 14-inch M2 Max, release kernel
7.1.12-2-20261011.15-sep-ARCH(vmlinuz sha256ba10ef1e112fbf664e6b41615ba7c289dee3fd64ed2167757356f93b7ab30811, same as the release asset). The command line has no GPU driver parameter, socompute_preemptis at its default (auto, on for t6021). The animated Chromium page ran the whole time.Result: no wedge. 16 of 16 clients ran and every next client matched the reference hash (
2768e4ce034a). The page's frame counter advanced after every client.Kernel log counters for the boot went from 0 to 10
GPU timeout, with 0Cannot recover, 0GPU is crashedand 0 hung tasks. Each timeout showsFault info: ... read, reason: Unmapped, as in the earlier M2 Max kill result in this thread. That is the existing teardown path: the client's VM is unbound while the dispatch still runs. The kernel recovers without a reset. We did not use our reset.Not covered.
compute_preempt=0run on the same kernel needs a second boot.Files: kill-arm JSON per client, kernel log at the end of the run, launch log, with SHA256 sums. I can attach them if useful.
DanteCpp commentedon Dec 1, 2026
On my 16-inch M1 Max (J316c), the desktop stays responsive during heavy Qwen3.8-Flash-Next prefills in DS4 with
aurora.compute_preempt=1. DS4 requests a low-priority Vulkan compute queue. I haven’t noticed a loss in prompt or generation speed in normal use.That’s a different workload from the Gemma MoE run that lost 20% in decode. I’m comparing both settings on the same DS4 kernel, with the same Mesa build, model and prompt, so I can post prefill and generation rates separately.
I opened a draft for the M1 Max default. aurora-silicon/linux#3779
DanteCpp commentedon Dec 1, 2026
I ran Qwen3.8-Flash-Next Q2 in DS4 on the same 32-core M1 Max (J316c) with GPU compute preemption off and on. Both boots used the same DS4 kernel and Mesa driver.
Each column gives the median of five warm runs after one warm-up, with throughput ranges in parentheses. I used one boot per setting, an 8,192-token prompt, 1,024-token prefill chunks and 128 teacher-forced generation steps. The saved prefill logits matched across both arms. Wayland sync measures compositor event-loop response. Frame presentation and input-to-display latency require separate measurements.
Kernel
7.3.0-ds4-ARCH(build ID52eb45b3fbc37e119797d524f0ba8eb50a2585eb), Mesa19c3abf8d9f, DS4099bf8b943bf, low-priority Vulkan compute queue, power 100%.During the timed prefills, the kernel display driver waited one second for a GPU fence in 3 of 5 warm runs with preemption off and 0 of 5 with it on. That matches my experience of the desktop staying responsive. These measurements also show a small throughput cost in DS4.
I had btop open during part of testing. Desktop redraw activity was uncontrolled on these boots, so these deltas can include contention with the compositor. I’m repeating the comparison with a monitored static desktop.