D3D12.X: bound the huge-compile gate's commit wait #2130
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2130
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2130/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kalmarv on GitHub · 2026-11-25 05:35 UTC · original
Kalmarv:huge-compile-wait-bound→main· +86 −1 · 1 files · 1 commits · closed without mergingPart of #505. A background driver compile of a huge pipeline (256 KiB of DXIL and up, on an
xcl-pso*worker) takes its slot first and then sleeps until its commit headroom is free: 3 GiB, or 512× the DXIL above 6 MiB. Nothing but a title thread asking for that pipeline ends the sleep.@Royalflamejlh's measurement on #505 found this on a 32 GB machine at 27.7–31.5 GiB of process commit:
big_compile_turnthrough the world-load stop in 26 of 27 samples: one in the commit wait, two waiting for its slot;Free commit only fell during the run, so the holder would never have gone on. This PR bounds that wait; the headroom stays as it is. It is independent of #2098, which changes the default number of huge-compile slots in the same file.
What is in it
All of it is in
crates/xcl/src/hle/d3d12x/real.rs, one commit.big_compile_turnnow ends in two more cases, and the build then goes on with its slot.HUGE_IN_DRIVER, counts huge compiles inside the driver. It is a guard aroundbuild()indriver_compile_identified.big_compile_headroom) is unchanged. Per build it costs far more commit on AMD than on NVIDIA:the_commit_wait_ends_alone_or_after_the_longest_waitinjects the free-commit reading and the in-flight count. It checks that:big_compile_turnkeeps its signature and callsbig_compile_turn_alone, which takes the counter and both times, so the test can inject them.Tested
cargo test -p xcl --lib big_compile_tests(debug): 10 passed, 0 failed, 0 ignored.cargo test --workspace -- --test-threads=4(debug): 1155 passed, 0 failed, 46 ignored. SKIPPED notices: no native wave64, three unsupported per-lane FP forms, no heap windows, and validation steps the SDK's DXC 1.7 validator can't run. The new test ran and passed.main's gate (the old wait behind the same signature): it doesn't finish and was killed by a 20 s timeout.Regression run
scripts/smoke.ps1 -Seconds 120, the same retail title, default settings, on the machine above, release builds from clean trees.mainran at 04:51 UTC and this PR at 05:32 UTC, with the same settings.maincbc296a(this PR's base):this PR,
a72af1a:1324 against 1326 frames shown, and 30097 against 29946 MB of peak commit, so no regression. Both runs,
mainincluded, presented no frames in their last 6 s, so that stall does not come from this change. The new warning appears in neither runtime log.Not tested
AI use
Claude Code (Claude Opus 5.5) wrote the change, the test and this description, and ran the tests and the smoke pair.
🤖 Generated with Claude Code
@JoaoPauluu on GitHub · 2026-11-25 06:12 UTC · original
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with
main(1401 here; 1368 and 1370 on the twomainruns). Nodriver compile start/finishorhuge driver compileline appears in the log, so no huge compile came up in this run; this is a regression run only.Tested
x86_64-pc-windows-gnu.a72af1aas it is (based oncbc296a) andmain6e1e2be, no uncommitted changes. Retail title 1.0.2.1,scripts/linux/smoke.sh(#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main.Regression run
main (first run):
this PR:
The second
mainrun: 1370 frames,exit: 0x0, no device removal, no crash. Under Wine,peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 06:32 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@thehollowedone on GitHub · 2026-11-25 09:05 UTC · original
Independent Windows check on a72af1a. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11.
cargo build --workspace --offline --locked -j 4passed.cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4finished with 1155 passed, 0 failed, 46 ignored, including the stock compile-wait test. Cargo's pass count includes 25 runtime skip notices (20 no native wave64, three unsupported per-lane forms, one unavailable driver-cache control, and one no heap windows).local_compile_wait_requires_a_new_idle_interval_after_driver_activity.The timer probe used shortened thresholds, simulated memory and no native driver compile. No retail smoke was run. AI use: Codex (GPT-6, exact variant unspecified) wrote and ran the scratch test, ran the workspace suite and drafted this report.
@Kalmarv on GitHub · 2026-11-25 14:19 UTC · original
Closing: #1996 (merged) reworked the huge-build gate this PR changed. Builds that nobody is waiting for now wait for commit before they take a slot, and wanted builds have their own cap. That covers the stall this PR was for. The 10 s / 30 s bound on the commit wait isn't worth carrying alone against the new gate. If a run on a machine short of commit shows the wait hanging again, I'll reopen it against
main.AI use: Claude Code (Claude Opus 5.5) wrote this note.
Pull request closed