Skip to content

D3D12.X: the GPU-wait watchdog says where a chain of waits ends - #1123

Open
not-rex wants to merge 1 commit into
xcl-dev:mainfrom
not-rex:wait-burst-diag
Open

not-rex wants to merge 1 commit into
xcl-dev:mainfrom
not-rex:wait-burst-diag

Conversation

@not-rex

@not-rex not-rex commented Nov 24, 2026 •

Copy link
Copy Markdown

Diagnostics only, the plan from #505 (comment). When the GPU-wait watchdog releases a wait, it now also logs, once per burst, where the chain of waits behind it ends. Part of #505.

Today's lines give each cell's recorded / submitted / completed values. Those read the same for a cycle of queues and for a chain of waits behind one queue that is busy or held by a wait outside the sync graph, because the 5 s start when the CPU issues the Wait, not when the queue reaches it. Nothing is released, pruned or signalled differently.

What is in it

  • crates/xcl/src/hle/d3d12x/list_x.rs: before the watchdog releases expired waits, it takes the tracked Wait / Signal calls still in flight (calls_in_flight, read-only) and follows them from an expired wait's queue (wait_chain): a queue is held at its earliest tracked call in flight, and when that is a wait the chain goes on at the queue of the Signal that satisfies it. One xlog_warn! line per burst (at most one per 5 s timeout, 64 in all), written after the releases:
    D3D12.X: GPU wait chain: q3 Wait64(0x70416ab00>=0x577) -> q0 Wait64(0x70417fee8>=0x577) -> q2 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track); same_end=5/5 (expired cells this tick), earlier_releases=0, write64_cycle_breaks=0, sparse queue fence=39141/39142 rb=17/18
    
    (format example with made-up values, not from a run)
    • end=cycle: back at a queue already on the chain, so every queue on it is held at a wait.
    • end=signal: no tracked wait is in front of the queue. It is executing, or behind one of XCL's own tile-mapping waits, which are not in the graph (@upipibi's point 2 on D3D12.X: bridge Wait64BitValueX to GPU fences with exact cycle breaking #795).
    • end=unsubmitted: no submitted Signal satisfies the last wait.
    • end=signal-gone: the cell counts the value as submitted, but the graph tracks no Signal for it and the fence is below it. The graph lost track (a CPU release dropped the Signal, or it was not queued because the fence was already there, and the fence went back since). Printed with the cell's submitted and cpu_signaled values.
    • same_end=n/m: of the m cells released in this tick, how many have a chain that ends the same way at the same queue.
    • earlier_releases: cells the watchdog released before this tick. write64_cycle_breaks: Write64 Signals signalled on the CPU so far (the "would close a GPU cycle" line stops after 32; its counter moved to module scope for this). Mixed title-fence breaks are not counted.
  • Limit: a CPU release (the watchdog's or a cycle break's) drops the cell's tracked Signals up to its value, although they may still be queued. After the first one, a queue can look held at a wait that really sits behind such a Signal, and a chain can end in a cycle that is none. The line is exact only while both counts are 0.
  • The watchdog now reads the clock once per tick, for the chain check and for the expiry test (one existing line), so both see the same waits as expired.
  • crates/xcl/src/hle/d3d12x/sparse.rs: fence_status() for the end of that line: the tile-mapping queue's fence and the readback fence, as completed / last value asked for (decimal, like wait_for's own line). The state keeps a second reference to both fences outside STATE, because a submit can sleep for 5 s in wait_for with STATE locked, which is the case the line is for. The values asked for are read with try_lock; when the state is busy they print as ?, with the value the submit sleeps on (wait_for=N, two atomic stores around the sleep). The watchdog never blocks on it.
  • Tests in list_x.rs: wait_chain_names_where_expired_waits_end (graphs built by hand, no GPU: cycle, signal, unsubmitted, signal-gone, the line's text and same_end, one line per burst) and wait_chain_leaves_out_completed_calls (real fences, WARP is enough: calls the GPU has completed are not on a chain; skips with "no GPU").

Cost: while no wait expires, one pass over the armed waits on the watchdog's existing 50 ms tick (it only runs while a wait is armed), skipped for 5 s after a line. Nothing on the title's threads.

Rebased again on main 1a0bbe3a (head c6db70c): the only conflict was the test block beside #1452's new reset test in list_x.rs; both are kept, and the change is the same (+295/-4). The RTX 3080 suite and smoke runs below are from this head. Before that, on main 8f5fca5b (head 517e4df): main made the watchdog timeout configurable (gpu_wait_watchdog_timeout(), XCL_GPU_WAIT_TIMEOUT_MS); the expiry test and wait_chain_due now both use that function, so the chain line sees the same expired waits under an override. RTX 5070 Ti (Windows Sandbox, GPU-PV): wait_chain 2 of 2; full suite 1096 passed, 8 failed, the same 8 that fail on main there.

Tested

  • RTX 3080, cargo test --workspace -- --test-threads=4 at the head c6db70c (on main 1a0bbe3a): 1252 passed, 0 failed, 46 ignored; the SKIPPED lines are main's new lower/lower_dxil GPU agreement tests, the two no-wave64 tests and pso_measurement_compiles_an_exact_synthetic_record.
  • NVIDIA GeForce RTX 3080 10 GB (driver 610.88 / 32.0.16.1088, 32-lane waves), AMD Ryzen 9 5900X, Windows 11 Pro 26200; Rust 1.100.0 stable-x86_64-pc-windows-msvc; tests in the default (debug) profile, smoke runs in release.
  • cargo test --workspace -- --test-threads=4: 739 passed, 0 failed, 41 ignored (SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask and gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware, both "no wave64"). main 384f7f7 on the same machine: 737 passed, 0 failed, 41 ignored, the same two SKIPPED.
  • Game: the retail title (Xbox Series 1.0.2.1). In these 300 s runs it stayed in its first-run screens and menus (no ListX Runtime: fix ANSI CP_ACP path encoding, HLE alias stubs/handles, forwarders, and stub creation race #101 call, no world loading), so no wait expired and no GPU wait chain line was produced.

Regression run
RTX 3080, scripts/smoke.ps1, 300 s each, menus only (fresh data), main 1a0bbe3a (this PR's base) and then this PR's head c6db70c:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 3080
title: 06a19912
seconds: 300
exit: 0x0
frames shown: 8233 (PresentX 8233)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15316 MB
xcl-smoke v1
commit: c6db70c71fcf75f850e0dc06855d1da27093fde7
gpu: NVIDIA GeForce RTX 3080
title: 06a19912
seconds: 300
exit: 0x0
frames shown: 8265 (PresentX 8265)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15314 MB

Not tested

  • The new line in a real title run: the title did not reach world loading on this machine in 300 s (see Tested), so no wait expired. A title run that reaches the GPU-wait releases described in Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #505 is still to come.
  • The watchdog path end to end in a test: no test waits out the 5 s timeout, so the lines added inside the watchdog loop (the call order, the rate limit's update, the counts, the sparse read) are covered only by a title run.
  • fence_status() has no unit test (it needs a sparse state and a device).
  • AMD, vkd3d-proton / Wine.
  • vram.rs's pages.fence wait is not in the line.

AI use

  • Claude Code with Claude Fable 5.2 wrote the code, the tests and this description; a Claude Opus 5.5 reviewer agent read the diff, and the fixes it asked for are in. The hardware suite and the smoke runs above were run by Claude Code (Claude Opus 5.5) agents on the RTX 3080 named, in a restricted local account; the counts and blocks are copied from those runs.

@Aniseto

Aniseto commented Nov 24, 2026

Copy link
Copy Markdown

Ran the new watchdog tests and the whole list_x unit set at 6a3c81a:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib wait_chain
2 passed; 0 failed; 0 ignored      (exit 0)

XCL_ADAPTER=nvidia cargo test -p xcl --lib list_x::tests
26 passed; 0 failed; 0 ignored     (exit 0)

wait_chain_names_where_expired_waits_end and wait_chain_leaves_out_completed_calls pass, and the rest of list_x is unaffected here. These are unit-level tests, so the adapter is not the variable; the datapoint is the Windows 11 build 26200 / MSVC 14.44.35207 / DXC 1.9.2609.5 toolchain next to the author's run.

Not tested: the retail-title path where the watchdog fires (no unpacked title here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified.

@Filip722

Filip722 commented Nov 24, 2026 •

Copy link
Copy Markdown

I tested 6a3c81a on an RTX 5060 Laptop GPU (8 GB, NVIDIA 615.78.08) on Bazzite 44 and Proton Experimental 11.0-20261112. The local stack was main 47efa2e with #640/#782/#793/#820, vkd3d-proton v3.1 with #257 and dxil-spirv 1dc543f. I also used the private texture placement experiment described in #175 and XCL_PSO_WAIT_MS=5000 to get past the earlier allocation fault.

The title recorded 2,207 sampled presents and 79,676 storage executions (65 failed). At the end there were 15 consecutive two-second activity samples with zero presents before the title exited at its watchdog-associated exception site. The session emitted neither an XCL wait release nor a GPU wait chain: line. It therefore did not exercise this PR's diagnostic trigger. The title watchdog can fire on this machine even when the tracked wait-release condition is absent.

OpenAI Codex with GPT-6.2-Sol high assisted with the test and report.

I symbolized our XCL and vkd3d-proton builds from that exit. The XCL wait watchdog was asleep with zero armed GPU waits. Three title recording threads were in pso_async::resolve_within, three workers were inside compute PSO creation, and the vkd3d submission workers were waiting for work. The same pattern appeared in the previous run. This supports looking at late pipeline compilation for this stall.

@IvyNotFound

Copy link
Copy Markdown

Retail run of 6a3c81a on an RTX 5080: both chain lines end at q4 end=signal, right after the 12 Write64 cycle breaks

Tested

xcl-smoke v1
commit: 6a3c81a9da642f13c360e02b00ccaa79120410bf
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 140
exit: 0x0
frames shown: 1396 (PresentX 1397)
presents per 2 s (last 3): 0 1 0
device removals: 0
crashes: 0
peak commit: 38132 MB

What the run shows

  • 92.78–93.18 s: 12 Write64 Signal … would close a GPU cycle – signalled on CPU, all for value 0x577, on q0–q4 (e.g. 0x70417fe58 = 0x577 on q3/ty0 (waiters=[q0,q4]), 0x70417fe68 = 0x577 on q4/ty2 (waiters=[q4])). There are no others in the run.
  • 97.46 s, first watchdog release, and the first chain line:
    D3D12.X: GPU queue.Wait at 0x70417fe10 >= 0x576 did not complete within 5000 ms (waiter=q4/ty2, prod=qSome(3)/tySome(0), recorded=0x577, submitted=0x577, completed=0x575) – released on CPU to prevent GPU hang
    D3D12.X: GPU wait chain: q4 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track); same_end=2/2 (expired cells this tick), earlier_releases=0, write64_cycle_breaks=12, sparse queue fence=35828/35828 rb=0/0
    
    37 cells are released between 97.46 and 97.92 s: q0, q1, q2 and q4 waiting for q3's 0x576 / 0x577, and q3 waiting for q0's, q1's, q2's and q4's. Their completed is 0x575 / 0x576. Only that first tick printed a chain line.
  • 106.13 s, the second and last chain line, while the sparse queue is behind:
    D3D12.X: GPU wait chain: q4 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track); same_end=3/5 (expired cells this tick), earlier_releases=39, write64_cycle_breaks=12, sparse queue fence=37664/? rb=0/? (state busy, wait_for=37665)
    
    followed at 106.95 s by sparse: the queue has not reached fence value 37665 after 5 s (at 37664).
  • 52 did not complete within 5000 ms lines in all. The run reached its 140 s with no device removal and no crash. At 127 s: 13 044 draws with translated pipelines (4 096 skipped), 24 688 dispatches (529 skipped). The frames presented after world loading are black, as on main.

So on this machine the chain never ends in cycle, unsubmitted or signal-gone: both times it stops at q4 with no tracked wait in front of it. In the first burst, the sparse queue is caught up (35828/35828), and it follows the only cycle breaks in the run by 4.7 s, close to the 5 s timeout.

Not tested

  • more than one run; AMD; the debug layer
  • what q4 is executing at that point (no PIX capture)

AI use

  • Claude Code, Claude Opus 5.5: built the PR, ran the tests and the run, picked the lines out of the log and wrote this comment.

@tiagonleal

Copy link
Copy Markdown
Contributor

Windows / NVIDIA retail test of 6a3c81a9da, on top of main 47efa2e + #684 + #1124 (all clean merges, tree 13ec1af).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (32-lane waves), driver 32.0.16.1742; Ryzen 7 9800X3D, 32 GB RAM; Windows 11 Pro 26300; rustc 1.100.0 MSVC.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug) on 13ec1af: 747 passed, 0 failed, 41 ignored. SKIPPED: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64).
  • Retail title 1.0.2.1, release, one 300 s run into world loading (XCL_NETWORK=0 XCL_PSO_WAIT_MS=50 XCL_PRESS_AT=30:A): presents end at 200 s, the run ends in the title's watchdog (+0x23cf683) at 229.8 s, as without this PR.
  • The new line fired 16 times, from 135.4 s to 227.0 s. Every chain ended the same way, at a queue's signal with nothing tracked in front of it:
D3D12.X: GPU wait chain: q3 Wait64(0x70417ff50>=0x6f9) -> q4 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track); same_end=3/3 (expired cells this tick), earlier_releases=0, write64_cycle_breaks=45, sparse queue fence=50436/50436 rb=0

End queues: q1 7×, q2 4×, q4 3×, q0 2×. write64_cycle_breaks went from 45 to 90 over the run.

Not tested: more runs (one); AMD / Intel. The full suite of another PR ran alongside part of this run.

Run and written with Claude Code (Claude Opus 5.5).

@ivall ivall added the goal:world-load Bears on the retail title getting past world loading label Nov 24, 2026
wondercrash added a commit to wondercrash/xcl that referenced this pull request Nov 24, 2026
Conflicts:
- list_x wake_sync_watchdog: xcl-dev#1045's split of the producer queue
  (graph_signal_q, recorded_last_q) kept in the expired tuple; xcl-dev#1123's
  waiters / earlier_releases added before the loop.
- list_x tests: both sides' new tests kept.
- sparse.rs: integ split State into Gpu (WORK) + State and already has
  hub_state(), which reports the sparse queue's fence and readback fence.
  xcl-dev#1123's fence_status() is not taken; the chain line uses hub_state()
  instead. What fence_status added is put into hub_state's busy case:
  STATUS_FENCES (set where init stores the Gpu) and WAIT_FOR_TARGET give
  the completed values and the value wait_for sleeps on while a submission
  holds WORK.
@Anon64

Anon64 commented Nov 25, 2026 •

Copy link
Copy Markdown

Test report from a retail title's world load, where this diagnostic answers the question it was written for.

Setup: this PR's head 517e4df merged onto main 80f4819 (clean merge), release. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, 64 GB RAM. A pressed every 4 s from 20 s, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_PRELOAD=0 XCL_NETWORK=0, 140 s.

What it logged at the stop (presents fall to 0 at ~80 s):

GPU queue.Wait at …fe38 >= 0x719 did not complete within 5000 ms (waiter=q0/ty2, prod=qSome(2)/tySome(0), recorded=0x719, submitted=0x719, completed=0x0) – released on CPU to prevent GPU hang
GPU wait chain: q0 Wait64(…fe38>=0x719) -> q2 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track); same_end=2/2 (expired cells this tick), earlier_releases=0, write64_cycle_breaks=0, sparse queue fence=33909/33909 rb=0/0
pending title ID3D12Fences during GPU wait timeout: 0xb61c3d0(done=0xe35/sig=0xe39/wait=0x0,cell=true), 0xbae2cd0(done=0x5/sig=0x7/wait=0x0,cell=true), 0xbae37a0(done=0x5/sig=0x6/wait=0x0,cell=true)
  • 0.25 s later, three more q0 / q1 waits on 0x719 from q2 expire, and one q1 wait on a value q0 writes.
  • The device is not removed and there is no TDR.

What that shows on this machine: the chain behind the title's q0 / q1 waits ends at q2, and q2 is not waiting on anything XCL's sync graph knows about. Without a TDR, q2 is more likely behind a wait XCL does not track than executing. It is not a title ID3D12CommandQueue::Wait on one of the pending fences: those show wait=0x0, and the log has no title ID3D12CommandQueue::Wait on … line at all (note_title_queue_wait logs the first eight), so this title queues no fence waits. XCL's own waits are none, and the sparse queue fence is complete. What q2 is behind is outside what this diagnostic sees.

Same shape without this PR: the same waiter=q0|q1, prod=qSome(2) expiries, with completed=0x0, come at the stop in every recent main run here:

So on this card the stop is this chain, not the pipeline builds that are still running around it.

The first run of this PR instead had a device removal at 62.3 s (0x887a0006, during a title-texture upload's copy), then the title's +0x2474606 assert. Since this PR only logs, I take that as the intermittent hang I also saw once with #1798.

Not tested: the whole suite; AMD.

Written with Claude Code (Claude Opus 5.5) from runs on this machine.

@Anon64

Anon64 commented Nov 25, 2026

Copy link
Copy Markdown

@not-rex a follow-up I'd like to write, stacked on this PR, unless you have it planned. On this machine the chain ends at q2 end=signal (no tracked wait in front of it …), which leaves open what q2 is doing (my report above). The next thing that would answer that:

  • when a chain ends at end=signal, log once what the end queue has in flight: its ExecuteCommandLists calls after its last completed fence value. Per call: the number of lists and, per list, its draws / dispatches / copies / barriers and the console-side waits / signals recorded in it, plus how long ago it was submitted.

That would tell "executing a long list" apart from "held by a wait inside a list that XCL does not track" (a wait recorded by console code in a list, for instance), without changing what is released. Diagnostics only, behind the same once-per-burst rule as yours, under ~200 lines with a unit test on a fake queue history. If you'd rather fold it into this PR, or it overlaps something you have, say so and I'll test that instead.

Written with Claude Code (Claude Opus 5.5).

@not-rex

not-rex commented Nov 25, 2026

Copy link
Copy Markdown
Author

@Anon64 thanks for the report, and yes please: I don't have that follow-up planned, so go ahead stacked on this one. What the end queue has in flight after its last completed fence is exactly the gap end=signal leaves. One data point that may help you pick what to log: on an RTX 3080 the stall goes away with XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 (#505, comment 7148521756), so per-list counts of dispatches that write into the coherent window would be worth having next to draws/dispatches/copies.

AI use: Claude Code (Claude Opus 5.5) wrote this.

@Anon64

Anon64 commented Nov 25, 2026

Copy link
Copy Markdown

The follow-up I proposed above, run in the title. It is a local commit on top of this PR's head, 11a1df9 on diag/chain-end-submissions, not pushed: a ring of the last 4 ExecuteCommandLists calls per queue (when, how many PC lists), printed in the end=signal case. It's about +60 lines with a unit test.

Same machine and settings as my report above (RTX 3060, main cbc296a + this PR + the commit, 150 s):

GPU wait chain: q0 Wait64(…fe58>=0x66c) -> q2 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track; submits: 32 lists 5.0 s ago, 11 lists 5.0 s ago, 29 lists 5.0 s ago, 33 lists 16.4 s ago); same_end=4/4 (expired cells this tick), earlier_releases=0, write64_cycle_breaks=0, sparse queue fence=33867/33867 rb=0/0

So q2 got three big submissions (72 lists) at the moment the waits were issued, 5 s before the line, and nothing since. The work that should write 0x66c is in those lists and has not completed. There is no TDR (no device removal, no crash in the run), so what holds q2 is inside one of those lists, not a hung command. That narrows the search to waits recorded inside those lists that XCL does not track.

If you're happy with it, I'll open it as a stacked PR (Stacked on #1123). If you'd rather fold it in here, take the commit.

Written with Claude Code (Claude Opus 5.5) from runs on this machine.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

@Dezmonius

Copy link
Copy Markdown

Native Windows data point for #1123 (517e4df) on RTX 5070 / 610.88, i7-7700K, Windows 10 19045. I applied the diagnostics to the same local cbc296ab + #1931 + #929 + DirectStorage test setup, keeping the base watchdog's wake helper. Offline Series X, direct DXIL, no frame dump. The first attempt reset D3D12 at 164.7 s before reaching the watchdog phase. With the D3D12 debug layer enabled, the repeat reached the 300 s timer (883 PresentX calls, exit 0).

The repeat logged four GPU watchdog releases grouped into three wait-chain samples. All three ended unsubmitted. The first had zero prior watchdog releases and zero cycle breaks. In that first cell the requested value had been recorded but the graph listed no submitted signal. At the next two bursts, the highest recorded value matched the wait and the tracked submitted/completed value was one step behind. The sparse work fence was caught up on all three samples. Later samples followed earlier CPU releases, so I would not use them alone to infer the original dependency graph.

This narrows the symptom to the missing tracked submission in this run; it does not distinguish why the recorded work was not submitted or exclude waits outside the graph. Focused cargo test --locked --offline -j 4 -p xcl --lib wait_chain -- --nocapture --test-threads=1: 2 passed, 0 failed, 0 ignored. No addresses, game data or raw logs included. AI-assisted (OpenAI Codex, GPT-6).

When a bridged Wait64 expires, the watchdog's lines give each cell's
recorded / submitted / completed values. They read the same for a cycle
of queues and for a chain of waits behind one queue that is busy, or
held by a wait outside the sync graph, because the 5 s start when the
CPU issues the Wait and not when the queue reaches it (xcl-dev#505).

Once per burst (at most one line per timeout, 64 lines in all) the
watchdog now follows the tracked waits from the queue of an expired
wait. A queue is held at its earliest tracked call in flight; when that
is a wait, the chain goes on at the queue of the Signal that satisfies
it. The line names the waits passed and where they end:

- end=cycle: a queue already on the chain,
- end=signal: a queue with no tracked wait in front of it, so it is
  executing or behind one of XCL's own tile-mapping waits, which are
  not in the graph (review of xcl-dev#795, point 2),
- end=unsubmitted: a wait that no submitted Signal satisfies,
- end=signal-gone: a wait on a cell that counts the value as submitted
  while the graph tracks no Signal for it and the fence is below it
  (the graph lost track; printed with the cell's submitted and
  CPU-signalled values).

With it: how many of the cells released in that tick end at the same
place, the watchdog's releases before this tick, the count of Write64
cycle breaks so far (their own line stops after 32), and the
tile-mapping queue's fence and readback fence as completed / asked for.

Limit: a CPU release (the watchdog's, a cycle break's) drops the cell's
tracked Signals up to its value although they may still be queued.
After the first one a queue can look held at a wait that really sits
behind such a Signal, and a chain can end in a cycle that is none. The
line is exact only while earlier_releases and write64_cycle_breaks are
0; mixed title-fence breaks are not counted.

No change to what is released or signalled. The calls in flight are
read under the graph lock before the releases, without pruning, and the
line is written after them. The watchdog now reads the clock once per
tick for the chain check and the expiry test, so both see the same
waits as expired. While no wait expires the cost is one pass over the
armed waits on the watchdog's 50 ms tick, skipped for one timeout after
a line. sparse.rs keeps a second reference to its two fences and the
value wait_for sleeps on, so that they can be read while a submit holds
the state.

Part of xcl-dev#505.

Assisted-by: Claude Code (Claude Fable 5.2)
@not-rex

not-rex commented Nov 25, 2026

Copy link
Copy Markdown
Author

Rebased onto main 1a0bbe3a (head c6db70c7). The only conflict was the test block next to #1452's new reset test in list_x.rs; both tests are kept, and the change itself is the same (+295/-4).

RTX 5070 Ti, cargo test -p xcl --lib --locked -- list_x: 36 passed, 0 failed, including wait_chain_names_where_expired_waits_end, wait_chain_leaves_out_completed_calls and a_reset_while_the_last_submit_runs_records_on_another_pc_list.

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

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants