Repository navigation
Conversation
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
The three lines of the first commit read "none / none / 0" in runs where the title had stopped after its first xcl-dev#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
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>
luckyteagirl
left a comment
There was a problem hiding this comment.
At exact head 590fb10 (stacked on 97e22f6, current main b49be18), the new trace can label a discarded Write64 as executed. This is a source-derived review; I did not run a title reproduction.
SyncCell::recorded_by saves only the raw PC-list address and a timestamp, while WRITE64_LISTS has one mutable trace per address. For example, record a Write64 for a cell, Reset that list before submission, then record an unrelated Write64 and execute the new recording on the same list. reset_pc notes Reset, but the later signal_write64_fences/KickoffX updates executed on the same trace. recording_trace accepts that later timestamp, so the old cell reports executed +… even though its recording was discarded. This conflicts with the PR's interpretation that “executed” means the write went out. Releasing the original list and reusing its address for a different list can produce the same attribution, since the address entry remains after on_release.
Could the trace be tied to a recording lifetime, so a Reset/Release closes the old recording and a later execution on the same address belongs to a new one? Extending the_cells_behind_summary_names_the_recording_list_and_what_came_to_it with Reset, an unrelated new recording, and Execute should leave the old cell at executed no; a release/address-reuse case would cover the other path.
AI assistance: GPT-6.2 Sol agents independently found the Reset and address-reuse cases; GPT-6.2 Astra verified the exact-head source and combined the report.
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>
|
Independent AMD RDNA4 (native wave64) verification of exact PR head Tested
(Compare against Not tested
AI use
|
|
@luckyteagirl Thanks, confirmed and fixed in Thanks @emirduran707 for the RX 9060 XT run of AI use: Claude Code, Claude Opus 5.5 wrote the fix, the test and this reply. |
|
Independent Ampere run with the #2244/#2718 diagnostics RTX 3090 Ti 24 GiB, driver 621.40, Windows 10, 32 GiB RAM. Release At 105.056 s, q3 had an unmet Wait64 at value The later allocator-level samples from 146.573 to 152.594 s showed q2 submitted 19, completed 18, with the four other tracked queues caught up. That is a distinct interval and queue. This run does not establish that the q3 wait caused the later q2 stall. The external RAM guard ended the run at 378 MiB available physical RAM and 11.12 GiB commit headroom, with no DXGI removal logged before the stop. Recording-time PSO wait follow-up. The only deliberate scheduling change was to let pending compute Dispatch and ExecuteIndirect calls use the existing recording-time PSO wait rather than enqueue a deferred segment. The application kept its original synchronization and required pipeline waits. The manifest matched all 11,721 starting native PSOs, and the effective environment differed only by the opt-in switch and run paths. In one run, submissions and streaming resumed. All five tracked allocator queues were caught up at 295.229 s, and two had one pending submit each at 297.237 s. Presentation had resumed at least once by 265.092 s. The device was then removed at 298.847 s (0x887a0005), with 12,011 MiB system commit headroom, local usage 17,631 MiB against a 23,541 MiB budget in the last sample, and no 4101/153 in the matching Windows event window. DRED had no breadcrumbs and no allocation for VA zero. This supports separating the earlier submit-time Reset stall from the later device removal. It does not establish which GPU workload caused the removal or prove stable rendering. AI use: Codex (GPT-6) adapted the diagnostics, ran the tests and compared the logs. |
|
Thanks @GodlyBDS for the RTX 3090 Ti run with #2244 and this PR ported to nvidia-dev AI use: Claude Code, Claude Opus 5.5 wrote this reply. |
|
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2718 at Setup
Targeted Win11 / RTX 4060 release unit tests (
|
Stacked on #2244; only the top two commits belong here (
590fb10, andceb7bc2from luckyteagirl's review).#2244's sync-state dump shows a
Wait64BitValueXcell recorded and never submitted (rec 0x619,sub 0x0@qNonein #1452 (comment)), but not which list recorded the value or what became of that list. Each such cell entry now names the PC list that recorded its highest value, and says whether that recording was later executed, or ended by a Reset or a Release, with each as its time after the recording:That tells apart the ways a recorded Write64 goes missing:
#2717 (a mid-list split that cannot make its next segment no longer closes the list) is one fix for the first case. Part of #1452.
What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:SyncCell::recorded_by(list and time of the recording that setrecorded_max, and that recording's trace). Each recording that records a Write64 has a trace of its last execute and the Reset or Release that ended it, held by the cells it recorded;WRITE64_LISTSmaps each list to the recording it has open. They are filled in bysignal_write64_fences, the KickoffX submit,reset_pc,clear_segment_stateandon_release.cells_behind_summaryprints them (try_lock, as for the graph).ceb7bc2(review): the trace was kept per list address, so after a Reset, or a Release and a new list at the same address, another recording's execute showed on the old cell asexecuted. A Reset or Release now ends the recording, and what comes to the list after is the next one's.the_cells_behind_summary_names_the_recording_list_and_what_came_to_it.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4atceb7bc24(on xcl run: XCL_THREAD_DUMP_AT also logs the fences and queue waits behind #2244's97e22f64,main72f848ca): 1415 passed, 0 failed, 46 ignoredV_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32),heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsby <list> … (executed no, reset no, released no), thenreset +… msafter a Reset. Then the review's two cases: a Reset, an unrelated recording on the list and its execute; and a Release, then a list at the same address that records and is executed. In both the old cell stays atexecuted noand the new recording's cell readsexecuted +…. With590fb10's trace the first case fails: the reset cell readsexecuted +0 ms.ceb7bc2on an AMD Radeon RX 9060 XT (driver 32.0.31044.16), xcl run: the sync-state dump names the list behind a Wait64 cell #2718 (comment): 1413 passed, 2 failed (fuzz_validate_and_gpu_1and_3, which fail on unmodifiedmainon that card, per the report), 46 ignored; boththe_cells_behind_summary_*tests passed; a 60 s smoke of another title: 1600 frames againstmain's 1603, no device removal, no crash.97e22f6andceb7bc2on another branch (nvidia-devaf2cecc), RTX 3090 Ti, driver 621.40. Boththe_cells_behind_summary_*tests passed. In a title run at 105.056 s, q3 waited on a cell for0x5e4, recorded up to0x5e5, with nothing submitted. Its line named the recording list withexecuted no, reset no, released no: a recorded producer that was never seen submitted, not a recording thrown away by a Reset or Release. The run does not show that this wait caused the q2 stall they saw later (146.6 to 152.6 s).Regression run
main (
b49be18):this PR (
ceb7bc2):Not tested
XCL_THREAD_DUMP_AT, so no dump is logged in themAI use
🤖 Generated with Claude Code