Repository navigation
Conversation
xcl-fences writes the completed values title threads spin on, and xcl-cpu-writes writes the values a GPU command list leaves for the CPU. At normal priority both can queue behind the very title threads that spin waiting for them. Both sleep nearly all the time, so THREAD_PRIORITY_HIGHEST costs the title little; not time-critical, as a fences wake can settle readbacks for up to 20 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DaZV7vMq866ni7pGnJC2Ew
|
Confirmed both production workers select Windows priority +2 (HIGHEST) on A bounded two-queue test distinguished the two publication paths. An ungated write on queue B first published 0xC3C3C3C3 and completed its receipt. Then I gated queue A, scheduled a deferred CPU write on A, scheduled a write to a different CPU cell on independent queue B, and signaled a B fence after B’s write-fence signal. At both priorities, the native B fence and its XCL CPU-visible mirror reached 1 while A was gated. B's CPU-write receipt remained pending throughout a subsequent 100 ms observation, and the cells still held 0 and 0xC3C3C3C3. Releasing A completed both receipts; acquire loads then read 0xA1A1A1A1 and 0xB2B2B2B2. This identifies a distinct limit when interpreting critical-path traces: a ready fence mirror can coexist with deferred CPU writes still queued behind another queue’s fence. Raising worker priority can affect runnable work, but this FIFO dependency survives the change. The 100 ms was an intentional observation window, not measured scheduler latency. The test used the production write scheduler and fence-mirror hook with native DIRECT queues. It did not exercise guest submit hooks, title CPU contention, or title frame time. AI disclosure: OpenAI Codex built and ran the fixture and drafted this report. |
KOLESNiii
left a comment
There was a problem hiding this comment.
Static review of 42503347 for the stack in the #3041 comparison.
I found no actionable issue in the tested fence and CPU-write worker priority changes.
Review assisted by Codex (GPT-6, exact variant unavailable). No new build or GPU run for this review.
bmjask
left a comment
There was a problem hiding this comment.
Critical review of current head 42503347. I found no immediate correctness defect in setting THREAD_PRIORITY_HIGHEST on the two sleeping completion workers; the work they wake for unblocks title threads. The remaining risk is scheduling under sustained wakeups: poll_fence_downloads and table().refresh() share the boosted fence worker, and neither call's duration is bounded here. Please report wake frequency and worst-case active time in a retail world, plus a before/after frame-time distribution. This is a nonblocking performance check. No local Windows run.
|
Test run data for the static review
Local system used for these runs was an RTX 2070 SUPER 8 GB (621.40, wave32), Ryzen 5 3600XT, 32 GB RAM, Windows 11 build 26300, and rustc 1.100.1. Claude Code (Claude Opus 5.5) ran the earlier tests. Codex (GPT-6, exact variant unavailable) checked the artifacts and ran the new build. |
|
Review (head 4250334, diff read, not a merge-check; draft, so not built or run):
Fine: AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
Test report (not a merge-check: draft) AI-written and posted by Foniass without a human check of each point. |
Requested by Prime
xcl-fenceswrites the completed values that title threads spin on, andxcl-cpu-writeswrites the values a GPU command list leaves for the CPU. At normal priority both can queue behind the very title threads that spin waiting for them. Both sleep nearly all the time, soTHREAD_PRIORITY_HIGHESTcosts the title little. Not time-critical: a fences wake can settle readbacks for up to 20 ms.What is in it
crates/xcl/src/hle/d3d12x/fence_x.rs:xcl-fencessetsTHREAD_PRIORITY_HIGHESTwhen it startscrates/xcl/src/hle/d3d12x/cpu_writes.rs:xcl-cpu-writesdoes the sameTested
cargo test --workspace --no-fail-fast -- --test-threads=4with the threeuma_drivertests below skipped, on 4250334: 2605 passed, 0 failed, 49 ignored (SKIPPED GPU tests: 28 lines: 21no wave64(this card runs wave32), 3 a wave32 per-lane form refused by the translator (gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426), 2no heap windows(opt-inXCL_HEAP_WINDOWS=1), 1no dxc.exe, 1cannot disable the driver cache(needs Windows Developer Mode))cargo test -p xcl --lib -- --test-threads=1 uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment uma_driver::tests::failed_restore_stops_before_importing_an_unbacked_window): 3 passed, 0 failed. They are left out of the whole run because on this PC's driver they can end the library test process (exit 0x7c10003, "coherent window could not be restored"), onmaintoocargo test -p xcl --lib -- --test-threads=4, same skips): 2466 passed, 0 failed; 2466 passed, 0 failedmainfa20459: 2605 passed, 0 failed, 49 ignored, 28SKIPPEDlines (own-prs-20261129 run, same command)scripts/smoke.ps1, no input, copied profile and shader cache): blocks belowRegression run
Not tested
AI use
Optional temporary Discord for coordinating contributor work, testing and comparing results.
🤖 Generated with Claude Code