Repository navigation
D3D12.X: the GPU wait watchdog lists the waits XCL put on queues itself - #1983
Merged
Merged
Conversation
When a bridged Wait64BitValueX times out, the watchdog logs the producer queue's state, but not the queue.Waits XCL adds on its own: texture page mappings (vram::before_execute), sparse uploads and tile mappings, and sparse readbacks. They are not in SYNC_GRAPH, so a producer queue that stands behind one of them looked like a queue with "no tracked wait". On an RTX 3080 10 GB (driver 621.01) with the retail title, every timeout came with the producer queue (and another title queue) waiting for the texture page-mapping fence, about 25 mappings behind after 7.7 s; skipping that one wait in a local experiment took the CPU releases from 4 to 0-1 per run. note_internal_wait records each such wait per queue, and each watchdog round logs the unmet ones next to the pending title fences. The watchdog timeout (5000 ms) can now be changed with XCL_GPU_WAIT_TIMEOUT_MS, like XCL_WAIT_TIMEOUT_MS for the CPU waits. No behaviour change otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015JSG96tVb4ZSAZ5WH4v95v
gustavsi
added a commit
to gustavsi/xcl
that referenced
this pull request
Nov 25, 2026
…watchdog) Integrates upstream PR xcl-dev#1983 so GPU wait watchdog timeouts list unmet XCL-issued queue waits (texture page mappings, sparse uploads) alongside pending title fences, plus XCL_GPU_WAIT_TIMEOUT_MS.
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Member
|
Code review on
Remaining before merge: |
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a bridged
Wait64BitValueXtimes out, the GPU wait watchdog logs the waiter, the producer queue and the pending title fences. It does not log thequeue.Waits that XCL adds on its own, for texture page mappings, sparse uploads and tile mappings, and sparse readbacks. Those are not inSYNC_GRAPH. A producer queue that stands behind one of them therefore looks like a queue with no tracked wait, which is what #1452 reported. This PR lists the unmet ones at every watchdog round, and makes the watchdog's 5 s timeout configurable for diagnostics. Logging only, no behaviour change. Context: #505 (comment)What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:note_internal_waitrecords each XCL-issued wait per queue, and drops the ones already met.internal_waits_summarylists the unmet ones. The watchdog logs them afterpending title ID3D12Fences.XCL_GPU_WAIT_TIMEOUT_MSoverridesGPU_WAIT_WATCHDOG_TIMEOUTthe same wayXCL_WAIT_TIMEOUT_MSoverrides the CPU timeout. Plus the unit testan_internal_wait_is_listed_until_its_fence_reaches_the_value.crates/xcl/src/hle/d3d12x/vram.rs(before_execute) andcrates/xcl/src/hle/d3d12x/sparse.rs(upload wait, readback wait): onenote_internal_waitcall after each existingqueue.Wait.Example line, from a local build with this change on a retail title. In that run the producer queue
q3andq2were waiting for the page-mapping fence:Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4onc4396e2: 994 passed, 0 failed, 45 ignored.validator 1.7 < 1.8 (validation step only); 19no wave64(32-lane hardware); 3 per-lane-form refusals inlower_dxil::tests::f16_programs_on_the_gpu/f32_programs_on_the_gpu(V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32: "its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's"); 1heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.mainc4d37be+ D3D12.X: a placed buffer's last Release does not wait for the sparse lock #1478 and local caps, with the same logging. There it showed every timeout's producer queue behind the page-mapping fence. Skipping that one wait, as a local experiment only, took the CPU releases from 4 to 0–1 per run.Regression run
Not tested
AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_015JSG96tVb4ZSAZ5WH4v95v