Skip to content

drm/asahi: g16: drop redundant same-VM TA barriers and lower compute fan-out threshold to 140 us - #3483

Merged
DjDeveloperr merged 6 commits into
mainfrom
perf/g16-ta-ring-c140
Dec 1, 2026
Merged

DjDeveloperr merged 6 commits into
mainfrom
perf/g16-ta-ring-c140

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What

Two independent g16 performance improvements based cleanly on main (ff59991a6c98):

  1. Leave same-VM TA order to the TA ring (480d4b59d5dd, counter staging fix 766141ca428d): Elide the redundant TA->TA prev_barrier (op 4 on TA(N-1) fw_stamp) for consecutive same-VM renders, keeping the barrier across different VMs or whenever InitBM is involved. Stage ta_prev and ta_order counts on Prefix and commit them to self.engine.stats only after publish_producer succeeds on the TA ring so an unpublished -EAGAIN prefix cannot skew stats.
  2. Lower compute heavy fan-out threshold to 140 us (af6c6e4423f5): Unify the compute EMA and in-flight probe fan-out crossover at 140 us (down from 200 us / 180 us) so ~180–185 us compute dispatches (compute.uber uniform d4) remain fanned out across pipes instead of serializing onto one pipe.

Tested

  • Host static / unit checks (at 766141ca428d55cd83c4f1a341a3c6d6116d0729):
    • scripts/checkpatch.pl --strict: 0/0/0 on 480d4b59d5dd and af6c6e4423f5; 0 errors / 1 warning / 0 checks on 766141ca428d (commit message line wrap; code diff 0/0/0).
    • tools/testing/selftests/drivers/gpu/asahi-m4/test-*.py: 26/26 pass (test-publication.py: 91 passed, 0 failed, including -EAGAIN and TA-producer-failure counter staging tests and dynamic publication.json count).
    • drivers/gpu/drm/asahi/ compiles cleanly with 0 errors and no new warnings.
  • J773g (Mac mini M4, T8132 / G16G B0) exact-head smoke at 766141ca428d55cd83c4f1a341a3c6d6116d0729 (7.3.0-ARCH-m4kgpr3483-766141ca, module build ID bc7b4e262d493a6c82a531d5661f7f83fb03b795, SLC ON 2 planes, 0 GPU faults/recoveries/hang kills/quarantine, gpubench-vk ae90a40, Mesa 90211df6816):
    • compute.uber uniform d4: 177.94 us (b022fbaf); render.postfx msaa=4 d1/d2: 775.19 / 714.29 us (668d6f0a); render.bindless_ubo 512 d2: 165.02 us (1af53d5c); render.deferred tile msaa=4 d2: 348.43 us (6dc74b48).
    • ta_prev (barriers, ring_ordered): (7, 0) -> (7, 56135) (delta +0 barriers / +56,135 ring-ordered).
  • J773g full mirrored 4-boot ABBA (main ff59991a6c98 vs f1dfa4fe1428 prior to the zero-wire-change counter-staging delta 766141ca428d; 4 fresh boots x 2 passes, 120 timed rows, 88/88 exact CRCs, SLC ON 2 planes, 0 faults/recoveries/hang kills/quarantine):
    • compute.uber uniform d4: -5.16% / -5.09% (187.6/187.4 -> 177.9/177.9 us, CRC b022fbaf)
    • render.postfx msaa=4 d1: -2.79% / -1.50% (807.8/803.9 -> 785.3/791.8 us, CRC 668d6f0a)
    • render.postfx msaa=4 d2: -2.15% / -1.44% (730.0/731.0 -> 714.3/720.5 us, CRC 668d6f0a)
    • render.bindless_ubo 512 d2: -1.55% / -1.58% (166.4/167.6 -> 163.8/164.9 us, CRC 1af53d5c)
    • Zero repeatable >1% regressions across all 15 timed rows; ta_prev.ring_ordered advanced +86,709/+84,482 (B1) and +85,488/+84,338 (B2), barrier delta +0.
Full J773g ABBA table (120 timed rows, 88/88 exact CRCs)
Workload A1 (us) B1 (us) B2 (us) A2 (us) Pair 1 / Pair 2 CRC
compute.uber uniform d4 187.62 177.94 177.87 187.41 -5.16% / -5.09% b022fbaf
render.postfx msaa=4 d1 807.81 785.26 791.78 803.86 -2.79% / -1.50% 668d6f0a
render.postfx msaa=4 d2 730.00 714.31 720.46 730.99 -2.15% / -1.44% 668d6f0a
render.bindless_ubo 512 d2 166.41 163.83 164.91 167.56 -1.55% / -1.58% 1af53d5c
render.bindless_ubo 512 d1 266.48 264.43 264.64 269.44 -0.77% / -1.78% 1af53d5c
render.mdi 1024 d4 128.58 127.50 128.08 129.37 -0.84% / -1.00% f69c5f55
render.deferred tile msaa=4 d2 351.37 351.62 349.90 351.37 +0.07% / -0.42% 6dc74b48
compute.light procs d4/d8/d16 48.3 / 44.1 / 43.6 48.1 / 44.1 / 43.2 48.2 / 44.2 / 43.6 48.5 / 44.4 / 43.6 -0.1% to -0.8% —
compute.light queue d64 28.41 28.39 28.37 28.91 -0.08% / -1.87% —

Risk

Two-way door (low risk): both changes are self-contained inside drivers/gpu/drm/asahi/g16/ and cleanly revertible without UAPI or on-disk impact. Cross-VM renders and any live/pending InitBM producer or consumer retain the explicit TA->TA prev_barrier, and all FS/compute barriers are unchanged. Lowering the compute fan-out threshold from 180–200 us to 140 us only widens the existing multi-pipe compute fan-out path already exercised for heavier compute workloads; compute.light rows stayed flat to slightly faster. Both changes touch shared g16 paths bound on T8132 (G16) and T6030/T8122 (G15).

Not yet

  • 2nd-gen G15 (T6030/T8122) hardware verification row prior to merge.

g16 posts a barrier on TA(N-1)'s stamp ahead of every pipelined TA whose
plan does not already wait on the previous FS. Every render's TA work
goes on the one firmware TA queue, whose works the firmware runs in ring
order: macOS posts no barriers on that ring at all, and in our J773g
captures of Metal running the postfx and bindless-UBO tests each pass's
tiling still starts after the previous pass's tiling has ended. For a
predecessor of the same VM, which shares the render's parameter buffer
and UMA slot only through that order, the barrier re-checks a stamp the
ring implies, and the firmware can hold the new record on it until a
later event.

Post it only when the ring's order does not cover it: behind another
VM's render, and whenever this render or a live flight carries InitBM.
Folded members always belong to the first member's VM, so only the
first member can follow another VM's render. The stats file counts the
barriers posted and the ones left to ring order.

The publication selftest covers the decision, and checks that it is
taken after every InitBM producer is known.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Barrier-free compute of one queue stays on its pipe, where the horizon
fold can merge it, until the queue counts as heavy and fans out across
two pipes. A queue is heavy when its retired CDM time EWMA reaches
COMPUTE_HEAVY_EMA_US (200 us), or when a sole single-command flight of
it has run for COMPUTE_HEAVY_INFLIGHT_NS (180 us).

A stream of ~185 us dispatches sits between the two limits. The
in-flight probe promotes it while one of its flights runs alone on a
pipe, but stops applying once a second flight shares that pipe, and the
EWMA stays under 200 us, so the queue drops back to one pipe and
serializes. Whether such a stream fans out depends on submit timing.

Use one crossover for both decisions and put it at 140 us. Dispatches
of that size clear it with room to get faster, while light dispatches,
a few tens of microseconds each, still stay on one pipe and fold.

The publication selftest now takes both limits from hw.rs and checks
the probe and EWMA boundaries at 140 us.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 28, 2026 04:57
Stage `ta_prev` and `ta_order` counts on `Prefix` during `prefix_render` and commit them to `self.engine.stats` only after `publish_producer` publishes the TA producer index, so an unpublished prefix rejected by `recovery_pending()` (-EAGAIN) or an earlier publication error never advances the barrier counters.

Also update `test-publication.py` to cover the -EAGAIN and TA-publication failure paths and record the actual passed test count in `publication.json`.

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.

Verdict: FINISH, then merge at 766141ca

Blockers:

  1. Missing second-generation G15 (T6030/T8122) hardware row and exact-head J773g smoke on 766141ca (as listed under "Not yet").
  2. Wait for the 19 queued CI checks and rerun the 2 cancelled checks so CI is green at head.

Checked:

  • drivers/gpu/drm/asahi/g16/engine.rs: verified ta_ring_orders_prev(cross_vm_prev, producer_initbm) elides the TA->TA prev_barrier only for consecutive same-VM renders with no InitBM producer/consumer, while preserving cross-VM and InitBM barriers and staging ta_prev/ta_order stats on Prefix so they commit only after publish_producer succeeds.
  • drivers/gpu/drm/asahi/g16/hw.rs:1298-1306: verified COMPUTE_HEAVY_EMA_US = 140 and COMPUTE_HEAVY_INFLIGHT_NS = COMPUTE_HEAVY_EMA_US as u64 * 1000 unify the probe and EWMA crossover cleanly.
  • tools/testing/selftests/drivers/gpu/asahi-m4/test-publication.py: verified 91/91 tests cover ring ordering, -EAGAIN/TA-failure stat staging, and the 140 us crossover.
  • Verified J773g M4 ABBA results (compute.uber uniform d4 -5.1%, render.postfx msaa=4 -2.1%, 88/88 exact CRCs, 0 GPU faults).
Evidence
  • Diff reviewed at 766141ca (4 files, 386 lines).
  • Code is clean; ready for approval once the G15 row, exact-head smoke, and green CI land.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verdict at 766141ca428d55cd83c4f1a341a3c6d6116d0729

CODE-CLEAR. The TA counters now advance when firmware can see the new TA producer. Retrying a prefix rejected before that write leaves both totals intact.

Blockers

The earlier J773g result covers the tree before the counter fix. Merge requires a J773g run at this head and one G15 run on T6030 or T8122 with the 26B123 handoff selecting this backend. Exercise consecutive same-VM render passes and barrier-free compute, and report output checks, counter deltas and GPU faults or recoveries.

Checked

The omitted TA barrier and its ring-head advance are paired. Cross-VM and InitBM paths retain the wait. The fragment wait on its own TA, compute dependencies, producer write barriers and retirement cursors stay in place. Both the TA optimization and the 140 µs compute threshold reach G15 and G16 through the same backend.

Evidence

All 26 M4 host test scripts passed locally. The publication harness reported 91 passed and its JSON agreed. Its new test covers recovery before publication, a failed TA producer write, and a successful write. The clean merge into 55184f00a33d produced tree 3f6069024e08, matching GitHub. Strict checkpatch on the three formatted commits reported one warning about a long commit-message line in 766141ca428d, with zero errors and zero checks.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:all 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 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Merge readiness at ba4bc322: not ready yet

Check Detail
CI at head running running: apple-build, host-tests, KUnit plan
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at ba4bc322
Conflicts ok none
PR text ok Risk: two-way · (low risk): both changes are self-contained inside drivers/gpu/drm/asahi/g16/ and cleanly revertible without UAPI or on-disk impact. Cross-VM renders and any live/pending InitBM producer or consumer retain the explicit TA->TA prev_barrier, and all FS/compute barriers are unchanged. Lowering the compute fan-out threshold from 180–200 us to 140 us only widens the existing multi-pipe compute fan-out path already exercised for heavier compute workloads; compute.light rows stayed flat to slightly faster. Both changes touch shared g16 paths bound on T8132 (G16) and T6030/T8122 (G15).

Areas: area:gpu

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

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.

Code review PASS at 766141ca42.

Verified:

  • ta_ring_orders_prev(cross_vm_prev, producer_initbm) conservatively preserves the explicit TA->TA prev_barrier for cross-VM predecessors and any InitBM producer/consumer, dropping it only for same-VM non-InitBM renders already serialized by the single firmware TA ring.
  • Decision runs after producer_initbm is finalized, and ta_prev / ta_order stats are staged on Prefix and committed only on TA publication.
  • Lowering COMPUTE_HEAVY_EMA_US to 140 and tying COMPUTE_HEAVY_INFLIGHT_NS = COMPUTE_HEAVY_EMA_US * 1000 keeps the probe/EWMA crossover aligned.
  • Signed-off-by present.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Nov 28, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s (MacBook Pro 16" M3 Pro, T6030, G15S) row at 766141ca428d: PASS. One-shot boot of the exact head, default cmdline, 27.2 firmware, the head's own J516s DTB.

  • SLC on: PLANE_CACHE_STATUS is 0x2100 on all six MCC planes (16 data and 16 tag ways). The GPU ran at S8 (1380 MHz) in 4,885 of 5,042 busy samples, die peak 59.5 C.
  • GPU health: 0 GPU faults, 0 recoveries or hang kills, no completion-stamp lines, 0 failed units, about 2.98 million jobs. The only new kernel error is this Mac's usual per-boot hid-generic "no listeners" line.
  • The new path ran: ta_prev ring_ordered went 0 → 548,862; explicit TA barriers went 219 → 322.
  • gpubench-vk CRCs (cba9025, aurora-wip Mesa 69179743d9ae, 2 passes of 45 rows): 90/90 rows ok. All 44 pinned-CRC results match the CPU reference: render.postfx msaa=4 1080p 668d6f0a, render.bindless_ubo 512 1af53d5c, render.mdi 1024 f69c5f55, render.deferred tile msaa=4 6dc74b48, render.shadow depth_only c0fb9993 and alpha_test 7be9463a, compute.uber uniform b022fbaf and divergent 9963f56c, compute.conv2d gaussian 2d55a14d, compute.edge sobel 27c79e6d, compute.cull_mdi 57276de2. These are the same CRCs as earlier J516s boots and the ones in the J773g table. The compress.bw array structural check is valid 4/4 (that row has no pinned CRC).
  • CTS (one process, multi_queue excluded): 1,188 cases sampled from the synchronization and synchronization2 subsets (basic, smoke, timeline_semaphore, op.single_queue, signal_order, implicit) and compute. 914 Pass, 274 NotSupported, 0 Fail.
  • Timing: there was no main boot in this window, so this row doesn't claim a speedup or a regression. Against the 11-27 J516s boot with the same Mesa kit (older main), the rows from the J773g table are flat: compute.uber uniform d4 113.0 → 113.0 µs, render.postfx msaa=4 d2 902.5 → 907.5 µs, render.bindless_ubo 512 d2 339.7 → 343.1 µs. Depth-1 rows move by up to 8 % in either direction, about the same spread as between the two passes on this boot.
  • Restored to stock and checked afterwards.

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train note: this conflicts with main. Per Dj (relayed by ORCH5 23:01), the G16 order is #3483 -> #3499 -> #3503, and Dj's combined resolution applies cleanly on main 6c869fd; it must keep main's removal of the old TA-wave constants. Please push that resolution here (normal push). It then needs the App review at the new head and CI, and a J773g smoke at that head. The ABBA rows carry over if the wire changes are unchanged.

Keep the removed TA-wave constants out of the publication fixture and
read the compute-heavy thresholds from the production definitions.

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.

Verdict: HOLD at 139d9f3b pending hosted checks and forward-merge hardware evidence.

Blockers: Provide current-head J773g/G16 and J516s/G15 verification or a source-equivalence receipt for the earlier runs. Keep #3483 ahead of #3499 and #3503.

Checked: The forward merge retains the removal of the old TA-wave constants. The barrier stays in place across VMs or when InitBM is involved. The TA counters are still published only after the producer update succeeds. Both compute thresholds still use the same 140 µs crossover. The earlier J773g and J516s runs cover both GPU families at the prior head.

Evidence

Checked the driver hunks on the forward merge onto 6c869fdf, and the J773g and J516s results at 766141ca.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) and removed ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Nov 29, 2026
Preserve shared compute UMA prefix accounting alongside TA ordering
and carry the checked publication host fixture.

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.

Verdict: HOLD at bfa0e654 pending hosted and hardware checks.

Checked: The forward merge's parents are the previously reviewed head and main at af1413dd. The PR still changes only G16 engine, hardware constants and polling plus the publication host fixture. The current diff preserves cross-VM and InitBM waits, records the TA counters after producer publication, keeps the 140 us crossover, and does not restore the old TA-wave constants.

Blockers: Fresh hosted CI and the requested J773g and J516s receipts remain. The linked older J516s run predates the newer base, and I found no row for this head. Keep the landing order #3483, #3499, then #3503.

@github-actions github-actions Bot removed ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Nov 29, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Hardware rows at head bfa0e654ff42:

  • J773g (M4 mini, G16G): the pinned-CRC smoke matches on every row, two passes: compute.uber uniform d4 b022fbaf, render.postfx msaa=4 d1/d2 668d6f0a, render.bindless_ubo 512 d2 1af53d5c, render.deferred tile msaa=4 d2 6dc74b48 (10/10). SLC on both planes, 0 GPU faults, recoveries, hang kills or quarantined owners. The same head also ran compute.light and render.light in queue, queues and procs modes over nine boots with 0 faults, and returned to the saved default each time.
  • J516s (M3 Pro, G15): exact-head native build, the same five pinned CRCs match. TA ring_ordered 0 → 23,348 with TA barriers unchanged at 241. 0 GPU faults, recoveries, hang kills or quarantined owners. Stock handback verified.

That covers the second-generation G15 row this PR was waiting on.

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

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: The forward merge's parents are the previously reviewed head and main at af1413dd. The PR still changes only G16 engine, hardware constants and polling plus the publication host fixture. The current diff preserves cross-VM and InitBM waits, records the TA counters after producer publication, keeps the 140 us crossover, and does not restore the old TA-wave constants.

Follow-ups (not blocking): fresh hosted CI, J773g/J516s receipts; landing order #3483, #3499, #3503

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 1, 2026
Keep both ring ordering predicates and counters, and commit the counts only after TA producer publication. Exercise both counters in the publication harness.

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

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No code blockers at ba4bc3220354. Main’s old TA-wave constants remain absent. The TA change preserves #3499’s FS decision. Each planned same-ring wait increments exactly one counter for its ring. Cross-VM and InitBM waits, the paired TA→FS barrier, and compute↔render dependencies remain intact in the shared G15S/G16G path.

All 91 publication tests passed, including both 140 µs compute boundaries. Recovery EAGAIN and a failed TA producer write leave all four counters unchanged. The suite omits one partial-publication case. I injected an FS write failure after a successful TA write in the host harness and confirmed all four counts stayed committed exactly once.

A peer maintainer can approve the code. Hosted CI is pending. The latest posted J773g smoke is on the previous head, bfa0e654ff42.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J773g (M4 mini, G16G B0) hardware row at ba4bc32203546f5f9661e78f41ef9c6ccf4f94fd: PASS.

One-shot boot of 7.3.0-ARCH-m4kpr3483-ba4bc3220354; the loaded aurora.ko build ID 71090b42179c97880e08ca4508074475329124e8 and module SHA-256 matched the kit. All 10 pinned GPUBench Vulkan CRCs matched across two passes of compute.uber, render.postfx (depths 1 and 2), render.bindless_ubo, and render.deferred. SLC enabled on both planes. GPU faults, recoveries, and hang kills: 0 each. Saved stock 7.3.0-ARCH-m4mainefed1ae3 verified with 0 failed units after clearing the temporary return timer.

@github-actions github-actions Bot removed ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) labels Dec 1, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s (M3 Pro, T6030, G15S B1) second-generation GPU smoke at ba4bc32203546f5f9661e78f41ef9c6ccf4f94fd passed.

One-shot boot of 7.3.0-m3-maint-gba4bc3220354 with its J516s DTB and the stock command line. The loaded aurora.ko build ID 4ff442c17e7644c505771a3c973586b9178de2ee matched the staged module. The installed and staged SHA-256 both matched a8addf58a1a83d61bfb77d33b67cb85cfa7df59054b2c9a581894127f4067ac8.

Both GPUBench Vulkan passes matched all 10 pinned CRCs for compute.uber uniform d4, render.postfx MSAA4 d1/d2, render.bindless_ubo 512 d2, and render.deferred tile MSAA4 d2. SLC was enabled on all six MCC planes. GPU faults, recoveries, hang kills, and quarantined owners were all zero.
TA ring ordering advanced from 0 to 46,324 with the explicit TA barrier count steady at 24.

Stock 7.3.0 handback verified with MCC passing, Wi-Fi up, zero failed units, and an empty GRUB environment.

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

Approve at ba4bc32 under the merge bar. G16 perf change with two-generation exact-head rows (J773g M4 mini and J516s M3 Pro: 10/10 pinned CRCs, SLC intact, 0 GPU faults), an independent review, host selftests 26/26 and no failing checks.

@DjDeveloperr
DjDeveloperr merged commit 7e019f2 into main Dec 1, 2026
8 of 11 checks passed
@DjDeveloperr
DjDeveloperr deleted the perf/g16-ta-ring-c140 branch December 1, 2026 10:21
DjDeveloperr added a commit that referenced this pull request Dec 2, 2026
Bring in main up to 1b2c361.

engine.rs: keep main's compute UMA slot conflict (compute_uma_conflict and
Flight::compute_uma_mask) in needs_engine_drain(). Keep the TA and FS ring
order of #3483 and #3499: same-VM TA->TA and FS->FS barriers are still
left to the rings and counted. With every render of another VM drained
first, the predecessor on the rings is always of the same VM, so the
cross_vm_prev input of ta_ring_orders_prev() and fs_ring_orders_prev()
goes away. Main's multisampling rule stays covered: this branch
already replaces it with the wider cross-VM drain.

test-publication.py: keep main's compute UMA, ring-order and TA
producer stats tests on the new signatures. Drop the multisampling fold
and VM-mark tests, whose code this branch removes.

Signed-off-by: DjDeveloperr <hey@djdev.me>
DjDeveloperr added a commit that referenced this pull request Dec 2, 2026
…r-pairs-on-3201

Bring in #3370's branch, which now carries #3353's branch and main up to
1b2c361.

Main changed the one render graph that this series splits into pairs.
Each pair now takes main's layout: its FS fw_stamp comes from the
firmware-cached ring allocator, it has its own ASC-cached FS notifier
page, and the shared scheduling context, now allocated in
Graphs::finish(), is handed to every pair there. Pair 0 keeps the
allocation order, and later pairs share its legacy_empty and
registration barrier as before.

Retirement keeps main's model per pair: the uncached TA and FS service
stamps gate it, the recovery-suspect path falls back to the stage
fw_stamps, and the notifier records are never read. The pair's own
targets and the latched per-flight TA/FS channel receipts of this
series take the place of main's single-pair queue_passed() and
queue_receipt(). Progress, the recovery snapshot and the report read
each pair's FS user_stamp[1], as main does for its one pair.

Render barriers: behind a render on another pair, the stage-order waits
on that pair's fw_stamps are always posted. Behind a render on this
pair, which is always of the same VM, the TA->TA and FS->FS barriers are
left to the ring's order as in #3483 and #3499, and counted. The
counters still commit only on TA producer publication, now on the pair's
queues. needs_engine_drain() keeps main's compute UMA slot conflict.

Selftests: the mocks index render pairs and read the service stamps.
This series' pair tests now set the service stamps instead of the
notifier, and main's tests carry the pair fields.

Signed-off-by: DjDeveloperr <hey@djdev.me>
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:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (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.

3 participants