Skip to content

xcl run: trace stalled Wait64 submission generations - #187

Draft
bmjask wants to merge 5 commits into
stack/183-sparse-copyback-cpu-writesfrom
stack/184-wait64-submission-generations
Draft

bmjask wants to merge 5 commits into
stack/183-sparse-copyback-cpu-writesfrom
stack/184-wait64-submission-generations

Conversation

@bmjask

@bmjask bmjask commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #186.

This is an internal draft stack in bmjask/xcl; it is not an upstream merge request.

What and why

This unit isolates xcl run: trace stalled wait64 submission generations as one reviewable step in the redesign.

What is in it

  • f81c9a57 is the cleaned-stack form of integrated commit 7f63f861.
  • 34fdb188 is the cleaned-stack form of integrated commit 007f2ddb.
  • 667b04f0 is the cleaned-stack form of integrated commit dd44f35d.
  • 44060c9c is the cleaned-stack form of integrated commit 09149c0e.
  • 3067a69c is the cleaned-stack form of integrated commit 9cb80c05.

The patch content is preserved; only ancestry changed to omit a canceled add/revert sequence.

Tested

Tests were not rerun while packaging this already-integrated change into the draft stack.

Regression run

Not run during stack packaging.

Not tested

  • Windows MSVC build and test suite
  • D3D12 GPU execution
  • scripts/smoke.ps1 main/head comparison

AI use

Codex, GPT-5.6-sol, removed canceled ancestry, created the stack branch, and drafted this description. It did not author new code during stack packaging.

@bmjask
bmjask force-pushed the stack/184-wait64-submission-generations branch 3 times, most recently from a739f2a to 9d85aab Compare November 27, 2026 05:14
bmjask and others added 5 commits November 27, 2026 04:32
A retail title's world load can stop with no GPU-wait time-out: presents,
submits and DirectStorage requests go to 0 and every thread waits. The
watchdog's summaries of pending title fences and of XCL's own unmet queue
waits are only logged at a time-out, so such a stop did not say whether
a fence or a queue was behind.

At each XCL_THREAD_DUMP_AT dump XCL now logs the two summaries and the
number of armed GPU waits, on a thread of its own so that a lock the
stall holds cannot hold up the next dump. On xcl-dev#2057's tree this showed
every fence and queue caught up at 135, 200 and 300 s after a stop at
110 s (xcl-dev#2057 (comment)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
Assisted-by: Codex (GPT-5.6-sol)
The three lines of the first commit read "none / none / 0" in runs where
the title had stopped after its first #101: no fence and no queue was
behind, yet nothing was presented. What showed the stop was a SYNC_GRAPH
cell whose recorded value is above what was submitted and completed,
with no GPU wait armed: a list that writes the value was recorded and
never submitted, so the submitting thread is held (GreemSC's runs, RX
7900 XT; the thread dump then named that thread).

cells_behind_summary lists such cells, and those with armed waits:
memory, completed, submitted (and on which queue), recorded and CPU
values, and the armed waits with their age. It takes the graph with
try_lock, since a dump can come while a submitting thread holds it.
The cell is read with ReadProcessMemory (dstorage::read_own), since
the title can decommit its page at any time; an unreadable cell shows
"mem unreadable" (bmjask's review).
The function is GreemSC's, from the review of this PR.

Co-authored-by: GreemSC <57862153+GreemSC@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
Assisted-by: Codex (GPT-5.6-sol)
A cell recorded and never submitted (xcl-dev#1452: rec 0x619, sub 0x0@qNone)
did not say which list recorded the value or what became of that list.
Each cell now keeps the PC list and time of the recording that set its
recorded_max, and each list that recorded a Write64 keeps its last
execute, Reset and Release (signal_write64_fences, the KickoffX submit,
reset_pc, clear_segment_state, on_release). The cell entry in
cells_behind_summary prints them as their time after the recording, or
"no": reset or released with no execute is a recording thrown away
(xcl-dev#2691's address reuse shows as a release), executed is a miss on the
submit side, and none of the three a list the title still holds.

Part of xcl-dev#1452.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Codex (GPT-5.6-sol)
The trace was kept per list address: after a Reset, or a Release and a
new list at the same address, a later execute of another recording
showed on the old cell as "executed", though its write was thrown away.
Each recording that records a Write64 now has a trace of its own, which
the cells it recorded hold; a Reset or Release ends it, and what comes
to the list after belongs to the next one.

The test adds both cases: Reset, an unrelated recording and its execute
leave the old cell at "executed no", and so do a Release and a list at
the same address that records and is executed.

Part of xcl-dev#1452.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Codex (GPT-5.6-sol)
The integrated execution path publishes captured SubmissionChunk effects instead of calling the legacy post-submit helpers. Capture each recording token with that immutable plan and mark it only after the exact chunk reaches the driver, so Reset, Release, address reuse, and split waits cannot redirect execution to another generation. Kickoff ends the actual reset target only after Reset succeeds. Recording-level tracing remains disabled unless XCL_THREAD_DUMP_AT schedules a dump.

Assisted-by: Codex (GPT-5.6-sol)
@bmjask
bmjask force-pushed the stack/183-sparse-copyback-cpu-writes branch from 7724ec4 to 776c594 Compare November 27, 2026 12:35
@bmjask
bmjask force-pushed the stack/184-wait64-submission-generations branch from 9d85aab to 39a9402 Compare November 27, 2026 12:35
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.

1 participant