Skip to content

drm/asahi: t6041: use the wide pool window - #2612

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:t6041-wide-pool-window
Nov 20, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:t6041-wide-pool-window

Conversation

@AxxzyWasTaken

Copy link
Copy Markdown
Contributor

Every ray tracing workload on the M4 Max ends in a lost device after 30 s. A compute pool is one object in the shared pool window, and it grows with the active cores: each core gets the dispatch's SCS pages (the ray query stacks) and a few more. With 40 cores, a ray query dispatch needs a pool larger than the narrow window's largest free range.

On a J616C that range was 206 MiB, while only 118-529 MiB of the 2 GiB window was in use. The placement was refused, ensure_compute retried until its 30 s budget ran out, and the client got a lost device:

G17 capacity refusal LowerVa count=1024 at g17/object.rs:95
G17: compute publication of owner 170 gave up after 30009 ms; ms by wait: sources=0 channel=30009 preparation=0 work state=0 recovery=0 outer room=0 publication=0; ...
GPU work of a client failed (EBUSY, reported at g17/runtime/backend.rs:83, client gpubench-rt-vk[55410]); the client sees a lost device

The capacity snapshot during the stall showed dynamic_lower_bytes used=118063104 total=2080374784 largest_hole=206061568 and LowerVa refusals past 1,900. It fails the same way on two Mesa builds: aurora-wip with djdev/g17p-dynamic-caching, and the J616C's daily j616c/host-1119.

This gives T6041 the A18 Pro's split from #1979: a 3264 MiB pool window and a 768 MiB client-private window. That PR already suggested it for the M4 Pro and Max. The private window peaked at 10 MiB here (client_private_bytes high_water=10420224).

J616C (T6041, 25G83), the daily kernel plus this change:

before after
pool window 2080 MiB, largest hole 206 MiB 3264 MiB, largest hole 411-525 MiB
LowerVa refusals 1,932+ 0
gpubench rt.trav comb lost device 201.6 Mrays/s
gpubench rt.rays incoherent lost device 255.9 Mrays/s
gpubench rt.scene medium lost device 334.7 fps
gpubench rt.scene solarbay lost device ok (4.24-4.28 ms GPU)
  • 51 ray tracing runs, none failed.
  • No GPU faults, recoveries or timeouts.
  • CS2 capped at 120 fps runs as before (119.8-119.9 fps).
  • tools/asahi/run-host-tests.py --only g17 90/90 on integration/aurora 2e1b085.
    • The full runner stops at pmp-floor-tests.py both with and without this change.

T6040 keeps the narrow split. With 20 cores its pools are half the size, and it isn't tested here. A J616s ray tracing row would show whether it needs the same change.

Disclosure: prepared with an AI tool (the commit carries Assisted-by: LLM); tested as described.

A compute pool is one object in the shared pool window, and its size
grows with the active cores: each core gets the dispatch's SCS pages
(the ray query stacks) and a few more. The M4 Max has 40 cores, so a ray
query dispatch needs a pool larger than the narrow window's largest free
range. On a J616C that range was 206 MiB, with only 118-529 MiB of the
2 GiB window in use. The placement was refused (LowerVa refusals passed
1,900), ensure_compute retried until its 30 s budget ran out, and the
client got a lost device:

  G17: compute publication of owner 170 gave up after 30009 ms; ms by
  wait: sources=0 channel=30009 ...

Every gpubench ray tracing test failed this way (rt.scene, rt.trav,
rt.rays), on two Mesa builds.

Give T6041 the A18 Pro's split ("drm/asahi: g17: fit a render pool for
every queue on the A18 Pro"), as that change already suggested for the
M4 Pro and Max: a 3264 MiB pool window and a 768 MiB client-private
window. The private window peaked at 10 MiB here.

On the J616C (T6041, firmware 25G83), after the change:
- pool window 3264 MiB, largest free range 411-525 MiB, 0 LowerVa
  refusals;
- rt.trav comb 201.6 Mrays/s, rt.rays incoherent 255.9 Mrays/s,
  rt.scene medium 334.7 fps; 51 ray tracing runs, none failed;
- CS2 capped at 120 fps runs as before, with no GPU errors.

T6040 keeps the narrow split: with 20 cores its pools are half the
size, and it is untested here.

Assisted-by: LLM
Signed-off-by: AxxzyWasTaken <[email protected]>

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

Approved, thanks: the cause is well measured, and the fix is the split #1979 already proposed for the M4 Max.

  • Scope: t6041::BASE is what every T6041 config takes, either directly (the 40-core J614C and J575C entries) or through ..t6041::BASE (the 32-core t6041_25g83::CONFIG). So every M4 Max gets the wide window. That's right: 40 cores are where the narrow window runs out.
  • T6040: it sets its own uat_quirks in t6040.rs and keeps narrow_pool_window: true, as the PR says. A J616s RT row decides whether it follows.
  • Hardware: the J616C table is the hardware row this needs: 0 LowerVa refusals, all four RT rows passing over 51 runs, no faults, and CS2 unchanged.

This merges once host-tests passes on this head.

Assisted-by: Claude Opus 5.5

@DjDeveloperr
DjDeveloperr merged commit b4cd7b3 into aurora-silicon:integration/aurora Nov 20, 2026
1 check passed
@AxxzyWasTaken

Copy link
Copy Markdown
Contributor Author

Thanks for the review. CI passes on a405381, and nothing more is planned for this PR. It's ready from my side whenever it suits you to merge. Ryan's team has a J616s ray tracing row queued to show whether T6040 needs the same split. This PR doesn't change T6040.

Disclosure: prepared with an AI tool (the commits carry Assisted-by: LLM); tested as described.

@RyanTheTide

Copy link
Copy Markdown
Contributor

J616s (M4 Pro, T6040, 20 cores) ray tracing row, on the narrow pool window: T6040 does not need the wide split.

Kernel 7.3.0-aurora-fleet75 (its pool window is t8140::dynamic::LOWER, 2080 MiB, the same window this PR moved T6041 off; integration keeps narrow_pool_window: true on T6040), Mesa c208afc352, 25G83 firmware, gpubench c36cbbef.

run 1 run 2 run 3
rt.scene medium (fps) 71.07 71.83 71.62
rt.trav comb (Mrays/s) 668.8 668.5 668.6
rt.rays incoherent (Mrays/s) 184.1 187.1 183.5

Also once each: rt.scene solarbay 66.85 fps, rt.scene heavy 15.78 fps, rt.rays incoherent 1M rays 204.1 (depth 1) / 215.3 (depth 4) Mrays/s.

  • 12/12 runs ok. 0 capacity refusal LowerVa, 0 compute publication ... gave up, 0 lost devices, 0 GPU faults.
  • aurora-g17/capacity during the heavy scene: dynamic_lower_bytes used=371277824 total=2080374784 largest_hole=1472626688. The largest free range stays at 1.4 GiB or more (the failing T6041 case had 206 MiB).
  • One info line during the heavy scene: G17: lifetime total 1 render groups retired on their pass record after 50 ms without completion stamps. The run still completed ok.
How it was run

rtrow.sh: each test 3 times as a fresh process, run as the desktop user, user space only, with a dmesg diff afterwards. The stress pass read /sys/kernel/debug/aurora-g17/capacity at idle, 6 s into each scene, and after.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants