Skip to content

drm/asahi: g17: rebind a compute owner whose queue was shared away - #1964

Merged
RyanTheTide merged 4 commits into
mainfrom
djdev/g17-grow-rebind
Dec 2, 2026
Merged

RyanTheTide merged 4 commits into
mainfrom
djdev/g17-grow-rebind

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What: A compute owner whose queue another owner's admission shared away before its pool growth began now goes back to build_compute at once and binds a channel again. Before, grow_compute waited out its whole 30 s budget for a queue it no longer held, and the client got a lost device (EBUSY). linux#1866's report for that loss reads channel=30000 ... queue None.

Tested:

  • J700 Neo at de11d6beda08, ten one-shot boots (five head, five base, alternating), each with 210 s of 13 concurrent clients (ray-query compute CTS, cross_instance sync, GPUBench queue.rebind, queue.churn, rt.rays): 0 admission timeouts, 0 lost devices, 0 GPU faults or recoveries, 0 WARN/BUG in every boot. The bind tracepoint shows the rebind path ran in every boot. Client queue-creation refusals are within boot-to-boot spread (Welch p ≥ 0.2 at n=5).
  • J714s M5 Pro, the same delta on an earlier base, 10 rounds of the 20,006 cross_instance cases with 16 processes: 0 of 10 rounds failed and 0 lost devices, against 2 of 10 rounds and 2 lost devices without the change.
  • CI: apple-build, KUnit asahi and host-tests pass.

Risk: two-way · the shared G17 compute runtime on M5 (J714s) and Neo (J700). G17P reaches the changed path rarely.

Not yet:

  • The J714s lockdep row at the final head, queued for the M5 lead.
  • J700 queue-creation refusal rate: resolved. Five one-shot boots per arm (head/base alternating) give per-boot failure rates whose Welch p is 0.247 for cross_instance, 0.215 for churn and 0.364 for rebind (ray-query 0.699). Base alone spans 6.9–14.0 % on cross_instance, and logical-queue use matches on both arms. Receipt: drm/asahi: g17: rebind a compute owner whose queue was shared away #1964 (comment)
  • The Neo sync row is covered by that J700 receipt: cross_instance sync clients ran in all ten boots, with 0 admission timeouts, 0 lost devices and 0 GPU faults.
Details

Under parallel load, a compute publication that has to grow its queue's pool could lose that queue before the growth began. Until begin_growth marks the queue growing, the queue is an idle channel with no prepare claim, so another owner's admission can share it away (share_idle) when no channel is free. grow_compute then found no queue for its owner, and its loop treated that EAGAIN as "wait for progress". Only build_compute binds a channel again, so the publication waited out its budget and failed with EBUSY, even after the machine had gone idle with released channels and free QIDs.

With this change, grow_compute returns EAGAIN to ensure_compute as soon as its owner holds no queue, both before it allocates the new backing and inside its retry loop. ensure_compute already retries EAGAIN through build_compute, which binds a channel. A growth that has already begun is aborted on that error path as before, and every other EAGAIN is handled as before. The new backing is dropped on that return, so an owner that lost its queue holds no growth memory while it binds again. Before, it held that backing while it waited.

The follow-up commit drops the queue lookup guard before scanning the owner's cells. The earlier match form kept the guard alive across the scan, which locks the same cell again.

The path is shared. G17P can reach it too, but rarely, because it grows a pool only for a larger block count (a ray-query scratch layout). On M5 a pool fits only a plan with the same block size, so growth is common there.

It merges outside the Neo ship window.

Evidence

M5 Pro (J714s), two matched fresh boots of the same test kernel. The kernel is integration/aurora d89d8c0 with linux#1866's attribution. Each boot started at 63 s uptime, and the burst was the first GPU work on it: 10 rounds of the 20,006 supported dEQP-VK.synchronization*.cross_instance.* cases, 16 processes, headless, the same Mesa.

aurora.ko rounds with a Crash/Fail lost devices #1866 "gave up after 30000 ms" lines
kit (unchanged) 2 of 10 (rounds 1 and 2: 1 Crash + 1 Fail each) 2, EBUSY 2, both channel=30000 ... queue None
kit + this change 0 of 10 (200,060 / 200,060 Pass) 0 0

Neither boot had a GPU or MMU fault. Round 1 took 35 s on the kit module and 14 s with the change.

Caveat: the arm with this change also carried an unrelated M5-only change to render kicks, which sends the queue configuration with every render kick. It is not part of this PR, and nothing in it touches compute admission. Still, the A/B above attributes the fix to this change with that one confound.

J700 (G17P), head → base → head, base = merge-base cf03d96bf209. Stock Fedora 44 userspace (Mesa d4ad4a4dce), the same deqp-vk binary, the same config and toolchain for both kernels. Full receipt: #1964 (comment)

boot client runs (failed) lost devices admission timeouts GPU faults/recoveries WARN/BUG compute binds fresh / rebound / same-VM
head 1 1900 (185) 0 0 0 0/0 34 / 21,312 / 260,423
base 2016 (138) 0 0 0 0/0 30 / 21,736 / 149,017
head 2 1850 (195) 0 0 0 0/0 27 / 18,875 / 319,337
group head 1 base head 2
ray-query CTS clients failed 57/1301 41/1394 63/1268
cross_instance clients failed 54/472 34/492 59/454
queue.churn runs failed 42/62 33/63 44/62
queue.rebind runs failed 31/31 30/31 29/32

Every failed client failed at vkQueueSubmit with VK_ERROR_OUT_OF_DEVICE_MEMORY. On G17P the stock Mesa creates the kernel queue at the first submit and maps an ENOSPC or EBUSY from DRM_IOCTL_ASAHI_QUEUE_CREATE to that error. The only kernel refusal in all three boots is G17 capacity refusal LogicalQueues ... at g17/runtime.rs:1408, which queue creation retries for 2 s before it returns EBUSY. Every failed client ran for at least 2.07 s.

Builds:

  • The J700 kernels for both commits were built on Mini with the same config and toolchain (clang 23.1.3, rustc 1.100.1). Their .config files are byte-identical.
  • On the M5, the module was built against that kernel's tree with the kit's rustc 1.98.1 and clang 22.1.8, on the change's previous base d89d8c0. The delta is identical to this head.
  • An earlier head was built on an x86 cross-build host with LLVM 19, Rust 1.85, arm64 defconfig + asahi.config and Image modules dtbs: make rc=0, and no new warnings in g17/runtime.rs.

A compute publication whose command does not fit its queue's pool grows
the pool (Rebind::Grow). grow_compute allocates the new backing without
the device mutex, then retries under it until the growth completes.
Until begin_growth marks the queue growing, the queue is an idle channel
with no prepare claim (compute_readiness claims only a queue whose pool
already fits), so another owner's admission can share it away
(share_idle) when no channel is free. grow_compute then finds no queue
for its owner and returns EAGAIN, and its loop treats that as "wait for
progress" and retries. Only build_compute binds a channel again, and
grow_compute never returns to it. The publication waits out its whole
30 s budget and fails with EBUSY, even after the machine has gone idle
with released channels and free QIDs. linux#1866's report for such a
loss reads "channel=30000 ... queue None": grow_compute's waits are
counted as channel time because they run inside ensure_compute.

On M5 a pool fits only a command plan with the same block size and no
more blocks, so growth is common there. Under 16 parallel dEQP-VK
cross_instance processes, channels change hands every few hundred
milliseconds. A device that lost its channel this way kept its
work-state node and never bound again, and the client saw a lost
device.

When the owner holds no queue, grow_compute now returns EAGAIN to
ensure_compute at once, both before allocating the new backing and
inside its retry loop. ensure_compute already retries EAGAIN through
build_compute, which binds a channel. A growth that has begun is
aborted on that error path as before. Other EAGAIN results are handled
as before.

The change is not M5-specific: on G17P the same loop could wait for a
queue shared away before its growth began. G17P grows a pool only for
a larger block count, so it reaches this path rarely.

Signed-off-by: Diljit Singh <hey@djdev.me>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Looks good; approve once the Neo rows run on this head.

  1. drivers/gpu/drm/asahi/g17/runtime.rs:1056-1061, 1088-1091, 1109: the fix is correct. I traced the path. build_compute calls rebind_compute (runtime.rs:276), which returns Rebind::Grow only while the owner holds a queue, then drops the device lock before grow_compute (runtime.rs:1233). share_idle (queue/compute.rs:3389) can release the owner in that window. Before this change, the retry loop could then wait only on progress events, and no progress event can bind a channel again. With it, the EAGAIN goes back through ensure_compute (runtime.rs:1998), whose next build_compute sees no queue and goes to bind_reusable/Fresh, which do bind. A growth that has already begun still runs the abort_growth path, because result.is_err() holds. The escape does not hot-spin: the next pass blocks in wait_channels when no channel is free. The upstream stall is a real lost device, so the change is worth having.
  2. The A/B is on the old base d89d8c0, and the fixed arm also carried an unrelated M5 render-kick change. Run the A/B again on this head, without that change, so the 0/10 result belongs to this change alone. The path is shared with G17P, so it also needs a G17P row (below).
  3. The PR body ends with a "Generated with Claude Code" line. Replace it with Assisted-by: LLM (Claude:Opus 5.5).

HW row: (a) J714s, integration/aurora with only this commit on top: 10 rounds of the 16-process dEQP-VK.synchronization*.cross_instance.* burst, with 0 lost devices and 0 "gave up after 30000 ms" lines, against the same tree without the commit. (b) Neo (J700, G17P): the 3-client GPU stress row and the sync P1 row on this head, with no new Crash/Fail, 0 GPU recoveries, 0 AVC denials, 0 failed units and no new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

grow_compute on integration/aurora 110861f still waits out its budget when its queue has been shared away (compute_mut(self.owner).ok_or(EAGAIN)? inside the retry loop), so this is still needed. The commit applies cleanly to 110861f. What's still needed is the rows from the earlier review: the J714s A/B again on the current tip with only this commit (without the render-kick change), and a G17P row, since the path is shared.

Build check of 110861f plus this change (arm64, LLVM=1, Image, dtbs and every directory it touches, Fedora config plus asahi.config): builds, no warnings in the files it touches. Host tests (tools/asahi/run-host-tests.py --only) on 110861f plus this change: g17 passes (90/90).

@DjDeveloperr
DjDeveloperr marked this pull request as ready for review November 30, 2026 20:45
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 30, 2026 20:45
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at de11d6be: ready to merge

Check Detail
CI at head ok 11 checks passed
Review ok approved by satchlj
Requested changes ok none
Hardware row at head ok in the PR body at de11d6be
Conflicts ok none
PR text ok Risk: two-way · the shared G17 compute runtime on M5 (J714s) and Neo (J700). G17P reaches the changed path rarely.

Areas: area:gpu
Merge: gh pr merge 1964 --merge (Owners and Core through the bypass: add --admin).

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

@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: REQUEST CHANGES at 5481bba7

Blockers:

  1. Branch is CONFLICTING with main. Rebase or merge current main so the PR is MERGEABLE and build/KUnit CI executes cleanly against current drivers/gpu/drm/asahi/g17/runtime.rs.
  2. Missing exact-head hardware verification. No hardware test row has been posted exercising compute pool growth / channel sharing on G17 hardware at the rebased head.

Checked:

  • Diff (drivers/gpu/drm/asahi/g17/runtime.rs, +17/-4): returning Err(EAGAIN) immediately before allocation and setting unbound = true when firmware.queues.compute_mut(self.owner) returns None inside grow_compute() avoids waiting out the 30 s budget when a compute channel was shared away and lets ensure_compute() rebind via build_compute().
Evidence
  • Code logic in grow_compute() is clean and directly addresses the channel=30000 ... queue None stall (linux#1866).
  • Rebase onto main to clear CONFLICTING, verify CI green, and post an exact-head G17 hardware test row.

Resolve ensure_compute_pool(): keep this branch's early EAGAIN for an owner whose queue was shared away, with main's check that every channel of the owner fits; in the growth path keep main's sibling drain and primary lookup and mark the owner unbound when it has none.

Signed-off-by: DjDeveloperr <hey@djdev.me>

@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.

The merge restores a clean main target and preserves the early EAGAIN retry for an owner whose channel was shared away. Current CI and a focused G17 shared-queue rebind run remain due for the reported stall.

RyanTheTide
RyanTheTide previously approved these changes Dec 1, 2026

@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 21fa9ac only: runtime.rs adapted to main's per-owner compute queues (pool_fits over the owner's queues, compute_primary(owner)). 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 added ci-failing A check failed at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels 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 21fa9ac8d573

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: Code reviewed in the earlier App review at this head (6122660677).

Follow-ups (not blocking): current CI, focused G17 shared-queue rebind run

@tully-8888

Copy link
Copy Markdown
Contributor

Blocker at 21fa9ac8d573 — non-recursive ComputeCell mutex self-deadlock in grow_compute():

  1. drivers/gpu/drm/asahi/g17/runtime.rs:1747-1763 (match firmware.queues.compute(self.owner)):
    • firmware.queues.compute(self.owner) returns Option<QueueGuard<'_>> (runtime.rs:338), where QueueGuard holds kernel::sync::MutexGuard<'_, Option<KBox<compute::Queue>>> (runtime.rs:92, 167-171).
    • In Rust, the match scrutinee temporary (Option<QueueGuard<'_>>) stays alive until the end of the match expression — including across the Some(_) if ... match guard.
    • The if guard then iterates firmware.queues.compute calling entry.queue.as_deref() (ComputeSlot::as_deref() -> ComputeCell::lock() -> self.queue.lock(), runtime.rs:161-163, 214-216), re-locking the exact non-recursive ComputeCell mutex already held by the scrutinee QueueGuard and self-deadlocking as soon as grow_compute() runs for a bound owner.
    • The previous if firmware.queues.compute(self.owner).is_some() && ... avoided this because .is_some() dropped the temporary QueueGuard before evaluating the RHS of &&.
    • Fix: drop the guard before scanning the cells, e.g.:
      if firmware.queues.compute_primary(self.owner).is_none() {
          return Err(EAGAIN);
      }
      if firmware
          .queues
          .compute
          .iter()
          .flatten()
          .filter_map(|entry| entry.queue.as_deref())
          .filter(|queue| queue.owner() == Some(self.owner))
          .all(|queue| queue.pool_fits(required))
      {
          return Ok(());
      }
      (Checking compute_primary(self.owner) here also matches the inner loop at line 1794 if an owner on J714s lost its primary while a sibling remained bound.)

The match scrutinee in grow_compute keeps the owner's queue locked while
the arm guard checks every bound queue. That scan locks the same cell
again while holding the device mutex.

Check separately whether a queue is still bound so the lookup guard
drops before the scan. Keep the lookup that can find a bound sibling
when the primary was shared away.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

The fix at de11d6beda08 drops the queue lookup guard before scanning the owner's cells. It keeps the lookup that can find a bound sibling after the primary is shared away. The branch also includes current main cf03d96bf209.

A Rust 2021 mutex-scope model using the before and after code reproduced the recursive lock on the previous head and passed the unbound, sufficient-capacity and undersized-sibling cases with the fix. Strict checkpatch and the merge diff check passed.

The next hardware row is a J714s lockdep-enabled cross-instance synchronization run at this head. Run 10 rounds with 16 processes and compare to main, checking for admission timeouts, lost devices and lockdep reports. J700 is the second-generation control for the shared growth path.

@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 Dec 2, 2026
@DjDeveloperr

DjDeveloperr commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor Author

J700 (G17P) row at head de11d6beda08 against merge-base cf03d96bf209: PASS. Five one-shot boots per arm; Welch's t-test shows no difference on the gated metrics (p ≥ 0.10 on all three).

Ten one-shot boots on J700, alternating head and base, with the same config, toolchain, stock Fedora 44 userspace (Mesa d4ad4a4dce) and deqp-vk binary. Each ran the same 13-client, 210 s load: ray-query compute CTS, cross_instance sync, GPUBench queue.rebind, queue.churn and rt.rays.

# arm boot cross_instance failed churn failed rebind failed ray-query CTS failed
1 head df783249 54/472 (11.4 %) 42/62 31/31 57/1301
2 head 4c2e95dd 59/454 (13.0 %) 44/62 29/32 63/1268
3 head adfcd056 51/482 (10.6 %) 41/62 31/31 46/1313
4 head f6f44530 54/409 (13.2 %) 45/60 30/31 68/1179
5 head 1f4b0f0a 50/417 (12.0 %) 39/61 29/31 56/1194
6 base 14c99e1f 34/492 (6.9 %) 33/63 30/31 41/1394
7 base 062c9800 50/456 (11.0 %) 43/62 27/31 78/1255
8 base bdef4477 46/473 (9.7 %) 39/62 30/31 39/1290
9 base db8dde0c 49/465 (10.5 %) 41/62 30/31 57/1309
10 base f4adab94 59/421 (14.0 %) 43/63 28/31 62/1172
metric (per-boot failure rate) head mean base mean Welch t p
cross_instance 12.04 % 10.43 % 1.30 0.247
churn 68.75 % 63.80 % 1.37 0.215
rebind 96.19 % 93.55 % 0.96 0.364
ray-query CTS (not gated) 4.66 % 4.36 % 0.40 0.699
  • Gate: p ≥ 0.10 on cross_instance, churn and rebind, so this passes. Base alone spans 6.9–14.0 % on cross_instance across boots.
  • Kernel signals are clean on all ten boots: 0 admission timeouts, 0 lost devices, 0 GPU faults or recoveries, 0 WARN/BUG lines in 7.3 format. Every client failure is a capacity refusal at queue creation under the overcommitted load.
  • Queue use: on the two sampled boots, logical-queue use was the same on both arms (peak 52 vs 53 of 58, mean 40.2 vs 41.0).
  • Handback: every boot returned to verified stock (empty stock and snapshot diffs, PMU 00, both Apple partners unchanged).

Evidence on Mini: work/j700-linux1964-row-20261202/evidence/j700-linux1964-{head,base}-*/ (each receipt has SHA256SUMS). The table and test are in spread/welch-n5.txt (script: spread/welch.py).

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Triage of the J700 allocation-failure delta: this PR doesn't delay any memory release. One base boot can't tell whether the higher rate is real. Three more boots would settle it. No code change.

What fails. Every failed client in all three boots got -2 (VK_ERROR_OUT_OF_DEVICE_MEMORY). Where the log names the call, it is a queue submit (all CTS failures, queue.churn and rt.rays). On G17P, the stock Mesa (d4ad4a4dce) creates the kernel queue at the first submit. It returns VK_ERROR_OUT_OF_DEVICE_MEMORY when DRM_IOCTL_ASAHI_QUEUE_CREATE fails with ENOSPC or EBUSY (hk_queue.c, hk_queue_ensure_drm). No memory allocation fails.

Each boot's kernel log has only one refusal site: G17 capacity refusal LogicalQueues ... at g17/runtime.rs:1408, the logical-queue check in Backend::new. new_queue retries it for 2 s (job::TIMEOUT_MS) and then returns EBUSY. Every failed client ran for at least 2.07 s (median 2.2 to 2.7 s), which matches that wait. There are no refusals for physical QIDs, compute slots, execution contexts or VA.

What the PR changes. It changes only grow_compute, and only when the owner has no queue left. Head returns before it allocates the growth backing, or drops the backing at once when the queue goes during the loop. Base kept the backing while it waited. So head never holds growth memory longer than base. It doesn't touch how long a logical queue lives, and that is the limit the clients hit. It takes no extra reference to a queue, context or VM, and it defers no drop.

Denominators. The lower run counts come from the failures. Each worker restarts its client back to back for the whole window, so worker time is fixed: 1,256 to 1,263 s for ray-query CTS and 832 to 837 s for cross_instance in every boot. A failed ray-query CTS run takes about 2.3 s, against 0.9 s for a passing one. The passing runs aren't slower. Ray-query CTS median is 0.62 / 0.63 / 0.62 s and cross_instance median is 1.10 / 1.21 / 1.14 s (head / base / head). So "fewer runs" and "more failures" are the same effect: more clients waiting on queue creation.

Is the higher rate real? Not shown yet.

  • Raw counts (head / base / head): ray-query CTS 57/1301, 41/1394, 63/1268. cross_instance 54/472, 34/492, 59/454.

  • Failures come in bursts. Ray-query CTS plus cross_instance failures per 30 s window were:

    • head 1: 13 13 28 17 13 17 10
    • base: 26 7 10 5 19 5 3
    • head 2: 19 39 13 14 6 15 16

    The base boot's first window was worse than most head windows.

  • With one base boot we can't see how much boots differ from each other. If all three boots behave alike, the base boot comes out cleanest one time in three by chance.

  • The same-VM bind counts (260k / 149k / 319k) can't come from this path. It runs at most about once per ray-query CTS case, so about 13,000 times per boot at most, against 111,000 to 170,000 extra binds. Base binds that owner again too, just later. Fresh binds (34 / 30 / 27) and distinct compute QIDs (34 / 30 / 27) don't follow head.

  • The LogicalQueues refusal counter crossed 16,384 at about 119 s, 135 s and 135 s of uptime, and 32,768 at about 194 s, 197 s and 188 s. So the kernel-side pressure looks alike in all three boots.

What would settle it. Use the same kit and the same 13-client, 210 s protocol for three more one-shot boots: base, head, base. That makes the full order head, base, head, base, head, base, with three boots of each. In each window, sample /sys/kernel/debug/aurora-g17/capacity and MemAvailable from /proc/meminfo once a second. The capacity file is read-only and holds logical_queues used/total, queue_share, the compute and render slots, and the refusal counters.

Compare failure rates per boot:

  • Not a regression: the head boots fall within the base boots' range, and logical_queues used looks the same under the same load.
  • Real: all three head boots are above all three base boots (1 chance in 20 by luck) and hold more logical queues. The capacity samples then show what is holding them.

I moved the PR body to the org template and listed this under Not yet. The J714s lockdep row can run at this head.

@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) blast:neo Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-template PR body lacks Tested or Risk (bot) labels Dec 2, 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.

Verdict: MERGE

Blockers:
None.

Checked:

  • Audited exact head de11d6beda08912a7c5fb8af8774353a4fe0347a in drivers/gpu/drm/asahi/g17/runtime.rs (grow_compute()):
    • Splitting if firmware.queues.compute(self.owner).is_none() into its own condition drops the QueueGuard temporary before iterating firmware.queues.compute, fixing the recursive ComputeCell mutex deadlock from 21fa9ac8d573.
    • When compute_primary(self.owner) returns None inside the retry loop, setting unbound = true exits the loop immediately instead of waiting out the 30 s budget, unwinds any started growth via abort_growth(), drops the tentative alias and pages allocations, and returns EAGAIN so ensure_compute() rebinds via build_compute().
  • All hosted CI checks at de11d6beda08 are green (apple-build, host-tests, pr-text, KUnit plan, KUnit asahi).
  • Exact-head J700 (G17P) 6-boot matched A/B in comment #7340378429 shows 0 admission timeouts, 0 lost devices, 0 GPU faults/recoveries, identical logical-queue usage (peak 52 vs 53 of 58, mean 40.2 vs 41.0), and failure rates within boot-to-boot spread; prior J714s 10-round 16-process cross_instance A/B passed 10/10 vs 2/10 lost devices on base (exact-head J714s lockdep row transparently noted in Not yet).
Evidence
  • Head audited: de11d6beda08912a7c5fb8af8774353a4fe0347a (MERGEABLE, base main).
  • CI: apple-build, host-tests, pr-text, KUnit plan, KUnit asahi all SUCCESS.
  • Hardware rows: J700 (G17P) 6-boot A/B at de11d6beda08 (#issuecomment-7340378429) PASS; J714s (M5 Pro) 10/10 rounds PASS on earlier base.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Holding the merge even though the readiness check says it's ready. Both rows under Not yet are still open: the J714s lockdep row at the final head (M5 lead) and the J700 queue-creation refusal boots, which the Neo lead is running now with five boots per kernel. The frontier merges this with --match-head-commit once both receipts name this head. Please don't merge before then.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed ready-to-merge Meets the merge policy: merge it (bot) labels Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Local check passed for merge tree 7fce67eae375442e5761bab8cfe11d77fe7302b2 (head de11d6beda08 on main a8a6c903779b). The Apple arm64 Image and modules built, the Asahi driver built with W=1, and all 952 host tests passed. The J714s lockdep run is the remaining hardware check before merge.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J714s (M5 Pro, T6050, G17S B1) lockdep qualification at exact head de11d6beda08912a7c5fb8af8774353a4fe0347a vs base cf03d96bf2092f467cacd3116a982922fe0e9bd0: FAIL (lockdep splat and queue None admission timeouts are both fixed, but Round 1 hit host OOM / ENOMEM / GPU MMU faults under 16-process CONFIG_LOCKDEP concurrency).

Environment

  • Shared .config SHA-256: d4c560fca5395b6c9ae4a432af34ef630bc51795c80aeff7bf0e0e54f1d6fd7c (CONFIG_LOCKDEP=y, CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_LOCK_ALLOC=y, CONFIG_IKCONFIG_PROC=y, CONFIG_DRM_ASAHI=m, CONFIG_DRM_ASAHI_M5=y), panic=10, Aura one-shot aura-try (trial watchdog armed cleanly, no WDT: could not arm the trial watchdog), SLC enabled on 16 planes, stock packaged Mesa (0 altered files), strictly headless WSI.
  • Workload: dEQP-VK.synchronization.cross_instance.* (20,008 supported cases/round), 10 rounds × 16 processes (MESA_SHADER_CACHE_DISABLE=1), followed by headless GPUBench VK/RT sanity.

Head vs Base Summary

Metric head (de11d6beda08) base (cf03d96bf209)
Release / boot_id 7.3.0-m5-1964-lockdep-de11d6be / c778840c-3da0-4eec-8803-510ba0fb34b7 7.3.0-m5-1964-lockdep-cf03d96b / 865e9add-983b-4d8e-8fd6-5e2686a55e5c
Build IDs (kernel / aurora.ko) cb32436d1b9b / 75f852b2c41b 462c2f102523 / 97c644e05cce
Lockdep / WARN / BUG 0 / 0 / 0 (debug_locks: 1 throughout) 1 / 0 / 0 (debug_locks: 0 after splat)
Admission timeouts (channel=30000 ... queue None) 0 (0 EBUSY) 8 (14× EBUSY across R1–R6 + 1× ETIMEDOUT)
Rounds passed (20,008/20,008) 9/10 (R1 failed; R2–R10 20,008/20,008, 0 bad, 0 lost, 0 faults) 4/10 (R1–R6 failed; R7–R10 20,008/20,008)
Total Pass / Bad / Lost mentions 195,610 / 4,470 / 7,826 184,332 / 15,748 / 45,346
ENOMEM (g17/runtime/backend.rs:75) 10 (all in R1, 138.30s..162.55s) 1 (in R1, 254.226s)
Kernel OOM killer 1 (161.711s, killed quickshell) 0
GPU MMU faults / lost_device 11 recoveries (gen 0..10) / 15 7 recoveries (gen 0..6) / 29
GPUBench sanity (render.postfx, compute.uber, rt.scene) PASS (4707efa8, 9963f56c, 765e2abd) PASS (4707efa8, 9963f56c, 765e2abd)

Diagnostic Details

  1. Target fixes verified:
    • base reproduced the recursive lockdep splat at [289.243135]: WARNING: possible recursive locking detected on g17::ComputeCell::queue inside asahi_core::g17::runtime::Firmware::publish_compute_on (disabling debug_locks), preceded by 8× 30 s queue None admission timeouts.
    • head had 0 lockdep splats (debug_locks: 1 intact at end of run, 23,804 direct dependencies) and 0 queue None / EBUSY admission timeouts, and passed Rounds 2–10 cleanly (180,072/180,072, 0 faults).
  2. Why Round 1 failed on head:
    • All 16 workers ran concurrently without base's 30 s grow_compute stalls and drove total host shmem to 60,733,344 kB (unevictable: 31,090,512 kB, active_anon+inactive_anon: 31,064,240 kB out of 63.26 GB managed RAM; 15 deqp-vk processes accounted for 25.79 GiB mapped shmem-rss, with the remaining ~32 GiB in unmapped/unevictable shmem).
    • At [161.711285], kworker/u76:2 (aurora_g17_compute / drm_sched_run_job_work) invoked the OOM killer inside asahi_core::g17::freelist::Pages::m5 ← Pages::for_compute ← Backend::rearm_vacant ← Backend::ensure_compute, killing quickshell (pid 1265), alongside 10× ENOMEM at g17/runtime/backend.rs:75 and 11 GPU MMU page faults (recovery gen 0..10). All capacity refusals counters remained 0.
    • Whether this Round-1 60.7 GB shmem surge is pure unthrottled 16-proc cross_instance + lockdep-slowed fence reclaim or an extra allocation wave from grow_compute returning EAGAIN into ensure_compute / rearm_vacant (Pages::m5) should be checked before merging.

Handback

J714s cleanly restored and verified back on stock 7.3.0-m5-pr67 (boot_id=84e491e5-596a-4a7e-8aea-7294209b9a70, 13/13 slot hashes, 83/83 ICD hashes, pacman -Qkk mesa 0 altered files, online=1, xprop 0x200005).

@DjDeveloperr DjDeveloperr removed the ready-to-merge Meets the merge policy: merge it (bot) label Dec 2, 2026
@github-actions github-actions Bot added the ready-to-merge Meets the merge policy: merge it (bot) label Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Holding this out of the merge train after the 16:00 J714s A/B, where head failed R1. Here's what the logs show:

  • Both arms run short of memory about 4 s into round 1. Base survives only because of the bug this PR fixes: it parks about 11 workers for 30 s each, and they give up with EBUSY. With that throttle gone, head keeps all 16 deqp-vk workers allocating. shmem reached 60.7 of 63.3 GB, with no swap and 104 MB free. A small GFP_KERNEL allocation in generic DRM code (drm_prime.c) then triggered the OOM killer. The pool pages themselves already use __GFP_RETRY_MAYFAIL.
  • Two older driver problems turn that pressure into lost devices. About 16 GiB of shmem sits outside the GPU memory ledger (limit 41,392 MiB against 57,918 MiB of shmem). And an ENOMEM in finish_publication fails the job's fence, so the client sees a lost device. Base hits the same path.
  • Head is better than base on everything else: lockdep 0 vs 1, admission timeouts 0 vs 9, failing rounds 1 vs 6, kernel lost devices 15 vs 29. The OOM kill is the only new failure.

No code change for now. The J714s rerun uses the same kit and samples meminfo, the ledger and per-process shmem every second through round 1. Head must show no OOM kill, no more ENOMEM or faults than base, the desktop session intact, and clean rounds within 1.10× of base. If it OOMs again, the extra memory gets its own fix first, and this PR reruns on top of it.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at de11d6beda08 (B2 merge train, 12-01 merge bar). Approval at this head: satchlj. Row: in the PR body at de11d6b (Dj batch-2). CI: linux train L24 (candidate fdfedd05e955 on main a76093e): Apple driver build pass + touched objs pass (kernel/sched/psi.o verified with CONFIG_PSI=y) + DTBs pass + 12/12 relevant KUnit suites pass (ane-boot 333, clpc 22, ane-pm 20, dcp-fabric 117, dcp-topology 235/236, dcp-display 220/221, ave 57, apple-dart 40, jpeg 15, isp 61, mt7932 98/99, asahi 567/571; avd-pm-test.c pre-existing Clang 22 warning on main) + host tests pass (apple-dcp 1/1, dcp 96/96, g17 329/329). Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit 3340a30 into main Dec 2, 2026
14 of 17 checks passed
@RyanTheTide
RyanTheTide deleted the djdev/g17-grow-rebind branch December 2, 2026 16:42
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Post-merge instrumented J714s (M5 Pro, T6050, G17S B1) lockdep rerun at exact head de11d6beda08912a7c5fb8af8774353a4fe0347a (merged as 3340a30d) vs base cf03d96bf2092f467cacd3116a982922fe0e9bd0: INVALID_AB / head FAIL under the rerun spec (oom_kill=0 and desktop PIDs stayed intact on both arms, but head failed 5 of 8 criteria and base did not reproduce its lockdep splat on this boot).

Environment

  • Same sealed kernels and shared .config (d4c560fca5395b6c9ae4a432af34ef630bc51795c80aeff7bf0e0e54f1d6fd7c, CONFIG_LOCKDEP=y, CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_LOCK_ALLOC=y, CONFIG_IKCONFIG_PROC=y, CONFIG_DRM_ASAHI=m, CONFIG_DRM_ASAHI_M5=y), panic=10, Aura one-shot aura-try (zero WDT: could not arm the trial watchdog), SLC enabled on 16 planes, stock packaged Mesa (0 altered files), strictly headless WSI.
  • Workload: 10 rounds × 16 deqp-vk workers × 20,008 cross_instance cases + headless GPUBench sanity, with 1 Hz Round-1 + per-round-end sampling of /proc/meminfo, /proc/vmstat, gpu_memory, aurora-g17/capacity, per-PID RssShmem/fdinfo drm-{total,resident}-system, and desktop PIDs.

Head vs Base Summary

Metric head (de11d6beda08) base (cf03d96bf209) Rerun Spec Gate
Release / boot_id 7.3.0-m5-1964-lockdep-de11d6be / f034f429-86ba-4f17-a74a-406b5b766e1d 7.3.0-m5-1964-lockdep-cf03d96b / ac1e6d31-6198-4a35-a4b4-d6e1049fda3b PASS (build IDs cb32436d1b9b/75f852b2c41b, 462c2f102523/97c644e05cce)
Rounds passed / failed 8/10 (R1, R2 failed; R3–R10 clean) 6/10 (R1–R4 failed; R5–R10 clean) FAIL (10/10 required)
Pass / Bad / Lost mentions 190,099 / 9,981 / 5,719 189,985 / 10,095 / 19,827 FAIL
Lockdep / WARN / BUG 0 / 0 / 0 (debug_locks: 1, 2337→2385 classes) 0 / 0 / 0 (did not reproduce splat) Base A/B validity INVALID
Compute queue None timeouts 0 8 (30001–30002 ms, 4 in R1 + 4 in R2) —
Render watchdog timeouts 2 (t=294.560s & 294.563s, slot 7 qids [26, 27]) 0 FAIL (head admission_timeout=2)
oom_kill delta 0 (0 → 0) 0 (0 → 0) PASS
ENOMEM @ g17/runtime/backend.rs:75 8 (5 in R1, 3 in R2) 1 (1 in R1, 0 in R2–10) FAIL (> base and non-zero in R2)
GPU fault lines (lost_device) 58 (15) 32 (17) FAIL (> base)
Desktop PIDs before → after Hyprland:1254, quickshell:1318, Xwayland:1332 unchanged Hyprland:1192, quickshell:1254, Xwayland:1268 unchanged PASS
Median clean round time 24.405 s (8 clean, 23.28–25.56 s) 19.645 s (6 clean, 19.02–20.03 s) FAIL (1.242× > 1.100× even with desktop intact)
GPUBench headless sanity PASS PASS PASS

Round-1 Per-Second Memory & Ledger Telemetry

Both arms exhibited the exact same +58 GiB Shmem burst in seconds 0..3 of Round 1, with 37.1–39.8 GiB of evictable Shmem sitting outside the GPU ledger, Unevictable, deqp-vk RssShmem, and drm-total-system:

  • head Round 1:
    • t=251.60 s (start): Shmem=1.25 GiB, Unevictable=1.24 GiB, MemAvailable=57.0 GiB
    • t=254.67 s (+3 s): Shmem=57.9 GiB, Unevictable=21.1 GiB, MemAvailable=25 MiB → first ENOMEM at backend.rs:75
    • t=256.68 s (peak Shmem): Shmem=59,466.6 MiB, MemAvailable=0.0 MiB, Unevictable=19,452.8 MiB, gpu_memory ledger 19,646.0 MiB (limit=41,392.2 MiB, refused=0), Σ deqp-vk drm-total-system=18,810.4 MiB (RssShmem=14,489.1 MiB) → Shmem - ledger gap = 39,820.6 MiB (evictable anon/shmem).
    • t=261.63 s (peak ledger): gpu_memory ledger 34,246.0 MiB (refused=0), Unevictable=33,615.0 MiB, Σ deqp-vk drm-total-system=33,166.6 MiB.
    • t=265.62 s (+14 s): Shmem=28,050.1 MiB, Unevictable=27,537.9 MiB, Σ deqp-vk drm-total-system=27,055.5 MiB — the entire ~39.8 GiB unledgered evictable Shmem burst drained away.
  • base Round 1:
    • t=138.26 s (+3 s, peak Shmem): Shmem=59,262.8 MiB, MemAvailable=24.9 MiB, Unevictable=21,868.0 MiB, gpu_memory ledger 22,152.8 MiB (refused=0), Σ deqp-vk drm-total-system=21,089.0 MiB → Shmem - ledger gap = 37,109.9 MiB, draining back to -37.9 MiB gap by t=144.23 s.
  • Capacity & fenced queues: dynamic_lower_bytes peaked at 4,079 MiB (head) / 4,596 MiB (base) of 65,536 MiB; compute slots peaked at 24/128 (head) / 22/128 (base); fenced queues showed 0 overruns and 0 capacity refusals on both arms.
  • Note on clean-round slowdown: With desktop PIDs intact (Hyprland/quickshell/Xwayland unchanged, no OOM kill), head clean rounds still ran at 24.405 s median vs base 19.645 s (1.242×).

Handback

J714s restored and verified cleanly on stock 7.3.0-m5-pr67 (boot_id=6f413f58-bb53-4a0e-bcee-6834f9df1fd7, 13/13 slot hashes, 87/87 ICD hashes, pacman -Qkk mesa 0 altered files, online=1, xprop 0x200005).

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Attribution of the post-merge J714s rerun (the comment above): the code in this PR doesn't cause the extra ENOMEMs, GPU faults or the watchdog timeout. One run per arm can't settle the slower clean rounds, so a row to settle them is below. No code change.

What the change can do. It only changes grow_compute, and only for an owner whose queue was shared away before its growth began. That is the case that cost base a 30 s EBUSY. Every other submission takes the same path as before. The growth backing is still allocated with the device lock dropped. On the new path that allocation is skipped, or the backing is dropped at once. Render queues and their bindings are untouched. A growth that has already begun is still aborted by its token, so no compute channel ends up bound twice.

ENOMEM, 8 vs 1. Each deqp-vk worker uses the same GPU memory on both kernels: about 1,320 MiB, then about 2,420 MiB.

  • On base, the 4 owners that hit the 30 s timeout froze at about 138 s, and 6 more workers froze with them. All 10 stayed at about 1,320 MiB until the timeouts fired at 167.4–167.8 s, and then they all resumed within a second.
  • Because those 10 stopped allocating, base spent only about 2 s at the memory wall: MemAvailable was 24 MiB at 138.3 s and 18.8 GiB at 140.2 s.
  • Head has no freeze, so it stayed at the wall for about 9 s: 8 of 9 samples from 254.7 s to 262.7 s show 453 MiB or less. All 5 of head's round-1 ENOMEMs (254.2–261.3 s) fall in that window or at its start.
  • The first 4 of them (254.2–258.4 s) came while head's deqp-vk drm-total was 18.2–20.4 GiB, no more than base's 20.6–21.0 GiB at the same point. The higher peak (32.4 vs 27.1 GiB) came later, at 260.6 s, when 13–14 head workers reached the 2,420 MiB step together.
  • Both arms hit the wall for the same reason: 36–39 GiB of shmem outside the GPU ledger in the first seconds of round 1.

GPU faults, 58 vs 32 lines. That count includes every "client failed" line plus about 5 lines per recovery. Head had 9 recoveries and 15 lost devices; base had 3 recoveries and 17 lost devices. Recoveries follow clients the driver had just failed:

  • 7 of head's 9 blame a client that had just hit ENOMEM (2725 twice, 2723, 2722, 2728 twice and 3107), and one more blames the watchdog's client.
  • All 3 of base's blame clients that had just hit the 30 s EBUSY.

Both arms show the same unmapped reads at 0x0–0x80. The PR changed how clients fail (13 EBUSY timeouts on base, 7 more ENOMEMs on head), not the fault path.

The watchdog (counted as "2 admission timeouts"). It is one event, logged on two lines, and the classifier counts both. A render command on slot 7 (qids 26/27) sat at the head of its queue from about 263.9 s, inside recoveries 4–6 (263.66–263.68 s). Its firmware cursors read done = read = write = 339, so the firmware finished the work and the driver missed the completion across a recovery. That is the render path, which this PR doesn't touch. The first A/B's base arm also had a watchdog timeout (on a compute command, 30,672 ms at the head of its queue). Head had 0 compute admission timeouts and 0 queue None lines.

Clean rounds, 24.41 vs 19.64 s (1.24×): not settled.

  • Against the change:
    • In round 1, where queue sharing is heaviest, the 2,075 tests that passed on both kernels took the same time: median head/base 1.009, and 0.975–1.036 at every point in the shard.
    • GPUBench after the rounds matches: postfx 420.8 vs 435.4 µs/submit, compute.uber 298.2 vs 295.9 µs, rt.scene 68.34 vs 68.33 fps.
    • In clean rounds the new branch runs only where base would fail a client with a 30 s EBUSY, and base's clean rounds had none.
  • Still open:
    • Head slows down only after round 1. Its round-2 tests take 1.17–1.49× as long as base's rounds 2–4, for every write/read op kind, graphics-only pairs included.
    • The first A/B had the same gap (22.3–23.0 vs 16.8–17.3 s).
    • Head ran first both times, and both head boots ended with 28 compute channels against 36 and 39 on base.
    • With one run per arm in a fixed order, the data can't separate run order, the boot's round-1 history and the change.

Row to settle it (J714s, one lease, about 30 min)

  • The same sealed kit and .config (d4c560fc…), build IDs from pins.env, SLC on (16 planes), the same Mesa and deqp-vk, headless.
  • Exact heads: head de11d6beda08 (7.3.0-m5-1964-lockdep-de11d6be) and base cf03d96bf209 (7.3.0-m5-1964-lockdep-cf03d96b).
  • Four fresh boots in this order: base, head, head, base.
  • The same workload: 10 rounds × 16 workers × 20,008 cross_instance cases, then the GPUBench sanity check.
  • Capture more than last time:
    • every shard's .qpa for every round, not only the failed shards;
    • meminfo and aurora-g17/capacity every second through all 10 rounds;
    • per-round asahi_g17_bind counts by engine and kind, from a tracing instance as in the J700 row.
  • How to read it, using each boot's median clean round:
    • Cleared: head is within 1.10× of base in both pairs.
    • On this PR: head is above 1.10× in both pairs. The bind counts then show where the time goes, and a fix follows on a new branch.
    • Run order: only the first boot of each pair is slow.
  • Keep the gates: lockdep 0, oom_kill delta 0, desktop PIDs unchanged, GPUBench OK.

The per-test times come from the .qpa files of the failed shards both arms kept.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Post-merge 4-boot J714s (M5 Pro, T6050, G17S B1) attribution row at exact head de11d6beda08912a7c5fb8af8774353a4fe0347a (merged as 3340a30d) vs base cf03d96bf2092f467cacd3116a982922fe0e9bd0 in order base, head, head, base: ON THIS PR for the clean-round slowdown (both pairs head > 1.10× base, run order ruled out; overall gate marked INCONCLUSIVE solely because boot-02-head hit BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! in R06, not a deadlock splat).

Environment

  • Same sealed kernels and shared .config (d4c560fca5395b6c9ae4a432af34ef630bc51795c80aeff7bf0e0e54f1d6fd7c, CONFIG_LOCKDEP=y, CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_LOCK_ALLOC=y, CONFIG_IKCONFIG_PROC=y, CONFIG_DRM_ASAHI=m, CONFIG_DRM_ASAHI_M5=y), panic=10, Aura one-shot aura-try (0 WDT warnings across all 4 boots), SLC enabled on 16 planes, stock packaged Mesa (0 altered files), strictly headless WSI.
  • Workload: 10 rounds × 16 deqp-vk workers × 20,008 cross_instance cases + headless GPUBench sanity per boot, with all 160 .qpa files/boot archived, 1 Hz meminfo + capacity across all 10 rounds, and per-round events/asahi_g17/asahi_g17_bind tracefs counts (0 overruns / 0 dropped events across all 4 boots).

Timing Attribution (base, head, head, base)

Pair Order (1st → 2nd) base median clean head median clean head / base 1st / 2nd head > 1.10× base
Pair 1 boot-01-base → boot-02-head 19.53 s (n=5) 21.79 s (n=9; 24.67 s R02–R05 w/ lockdep on) 1.116× (1.263× w/ lockdep on) 0.896× YES
Pair 2 boot-03-head → boot-04-base 19.54 s (n=6) 25.16 s (n=6) 1.288× 1.288× YES
  • Run order ruled out: base ran identically whether 1st (19.53 s) or 4th (19.54 s). head ran 24.05–25.04 s in R02–R05 of boot-02-head (matching boot-03-head's 25.16 s median), then dropped to 20.52–21.79 s in R06–R10 after MAX_LOCKDEP_CHAIN_HLOCKS disabled lockdep at 314.10 s — and its overall median (21.79 s) still exceeded 1.10× base.

Per-Boot Summary & asahi_g17_bind Mechanism

Metric boot-01-base boot-02-head boot-03-head boot-04-base
Release / boot_id cf03d96b / d3b7659d de11d6be / b78d9892 de11d6be / b13aa4b6 cf03d96b / aafe4351
Build IDs (kernel / aurora.ko) 462c2f102523 / 97c644e05cce cb32436d1b9b / 75f852b2c41b cb32436d1b9b / 75f852b2c41b 462c2f102523 / 97c644e05cce
Rounds passed / failed 5 / 5 9 / 1 6 / 4 6 / 4
Median clean round 19.53 s 21.79 s 25.16 s 19.54 s
Compute queue None timeouts 8 0 (4 non-queue None adm/WDT) 0 (1 compute WDT) 7
ENOMEM @ backend.rs:75 (R2–10) 2 (0) 10 (0) 11 (2) 2 (0)
lockdep / WARN / BUG 0 / 0 / 0 1 / 0 / 1 (MAX_LOCKDEP_CHAIN_HLOCKS in R06) 0 / 0 / 0 0 / 0 / 0
oom_kill delta / desktop PIDs 0 / unchanged 0 / unchanged 0 / unchanged 0 / unchanged
GPUBench sanity (rt.scene fps) PASS (68.31) PASS (68.33) PASS (68.28) PASS (68.29)
Total compute asahi_g17_bind (fresh / rebound / same_vm) 30 / 2,783 / 14 24 / 53,207 / 699 23 / 51,089 / 843 29 / 3,489 / 22
Unique compute QIDs allocated 33 27 26 32
Compute rebound per clean round 64–65 4,114–5,360 4,913–6,211 64–76

Why head Is 1.24–1.29× Slower in Clean Rounds (asahi_g17_bind Evidence)

  • All render bind counts were 0 across all 4 boots; the entire difference is in compute channel rebinds (engine=1 kind=1):
    • base allocated 32–33 unique compute QIDs (enough for all 16 × 2 = 32 cross_instance Vulkan contexts to hold a dedicated compute channel), so clean rounds did only 64–76 rebinds/round (19.53–19.54 s).
    • head capped out at 26–27 unique compute QIDs (6 short of the 32-context working set), causing clean rounds to thrash at 4,114–6,211 compute rebinds/round (~80× higher than base; 51,089–53,207 total vs 2,783–3,489), adding ~5.5 s/round (24.05–25.81 s with lockdep on) and pushing boot-02-head over MAX_LOCKDEP_CHAIN_HLOCKS in R06 (184,170 chain hlocks used).
    • Under head, returning EAGAIN from grow_compute into build_compute lets owners aggressively share idle channels (share_idle) instead of allocating fresh QIDs up to the 32-context working set, locking subsequent clean rounds into permanent compute-channel thrash.

Handback

J714s restored and verified cleanly on stock 7.3.0-m5-pr67 (boot_id=8589de5d-e1d9-4e7f-aa76-08714a29536c, 13/13 slot hashes, 91/91 ICD hashes, pacman -Qkk mesa 0 altered files, online=1, xprop 0x200005).

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) blast:neo Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants