DirectStorage: wait briefly for late destination pages #1464
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!1464
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1464"
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?
@sh00kapic on GitHub · 2026-11-24 16:30 UTC · original
sh00kapic:fix/dstorage-late-pages→main· +47 −2 · 1 files · 1 commits · draftPart of #505. During the retail title streaming, a destination physical-page list was still zero when a submitted DirectStorage request reached its worker. A diagnostic reread found a valid page in the same slot 50 ms later. The worker currently reports
E_ACCESS_VIOLATIONimmediately, after which the title receives many failed requests and stops presenting.This complements #1405: that PR handles stale nonzero page numbers between enqueue and execution; this PR gives zero entries a bounded chance to appear after execution begins.
What is in it
crates/xcl/src/hle/dstorage.rs: retry only zero destination page entries for up to 50 ms, usingread_own, and retain nonzero numbers snapshotted at enqueue. A focused test checks a late entry and preservation of a saved entry.Tested
cargo build --workspace;cargo test --workspace -- --test-threads=4: 771 passed, 0 failed, 41 ignored. Two GPU tests reportedSKIPPEDbecause this adapter has no wave64.Regression run
Both 20 s smoke runs stop before the late page case and used
XCL_PSO_PRELOAD=0.Main:
PR head:
Not tested
AI use
@crosettiremi on GitHub · 2026-11-24 16:45 UTC · original
Windows RX 7900 XT hardware comparison at
3b7d329, with the same downstream XCL stack, same saved Series X profile, separate copies of the same starting DXIL/PSO cache, and the same scripted Player1 selection. All 15 DirectStorage module tests passed.The individual warnings are rate-limited; the control printed only two failed-request warnings in its entire log. The candidate still logged a 64 KiB asset request returning 0x89240009. One run per build, with different request totals.
The candidate last presented in the sample ending at 194.1 s, then reported device removal (0x887a0006) at 196.3 s. DRED reported a page fault, and the next breadcrumb on a partly executed list was Dispatch. The control instead ended on a guest breakpoint after 248 s. The candidate’s last captured image was dark; I could not verify visible gameplay. The reduction in failed requests did not eliminate the later GPU fault on this stack.
@DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@Dezmonius on GitHub · 2026-11-24 23:34 UTC · original
Independent test of the #1464 patch (head
3b7d329a) applied cleanly to689f2db4. Both builds also had the same local, logging-only DirectStorage probes, capped at 32 events per process. RTX 5070, NVIDIA 610.88, i7-7700K, 32 GiB RAM, Windows 10 build 19045, extra fixed 24 GiB page file on NVMe, Rust 1.100.0 release. Both runs used the same starting profile, scripted A presses, offline settings, direct DXIL, two DXC threads, PSO preload off, and the same reused cache. The patched run went second, so cache state and timing could differ.All 32 sampled control errors and all four patched errors were file-backed requests that still had all-zero destination page IDs when the physical write was attempted. Both runs reached the world-loading artwork and ended at the configured timeout with exit 0. Neither resumed presenting after the artwork (118 vs 119 consecutive two-second samples with 0 presents). No device removal or guest exception was logged. This is one pair of runs. It shows fewer DirectStorage failures here, with the later presentation stall still present.
Focused synthetic tests:
cargo test --locked --offline -j 4 -p xcl --lib hle::dstorage::tests -- --test-threads=1: control 17 passed, patched 18 passed, zero failed or ignored in both. Full suite was not run. Only aggregate telemetry is included. OpenAI Codex (GPT-6) assisted with local instrumentation, testing and this report.@Dezmonius on GitHub · 2026-11-25 04:05 UTC · original
Follow-up on unmodified upstream
cbc296ab65a2661a61e3e2da109134bcd5319f60(same RTX 5070 / 610.88, offline, direct DXIL, two DXC threads, PSO preload off, 32 GiB RAM and 24 GiB extra SSD page file). The old #1464 diff no longer passesgit apply --checkagainst this main indstorage.rsaround the destination-page reread. I tested the upstream archive as-is.DXGI_ERROR_DEVICE_RESET(0x887a0007) at 162 s. Minimum available physical memory and commit headroom were 15.93 GiB and 29.26 GiB.XCL_DRED=1: 1,975 failures across 87,954 sampled requests. The first failure records were0x89240009. World-loading artwork was the last visible checkpoint, with 857 PresentX calls and 56 trailing two-second intervals at zero presents. This run ended at its 300 s timeout, exit 0, without another device reset.The runs differ in cache state and DRED, so this is not a controlled GPU-reset comparison. The repeat confirms this DirectStorage error still occurs on the newer main. No game data included. AI-assisted (OpenAI Codex, GPT-6).
@Dezmonius on GitHub · 2026-11-25 04:47 UTC · original
I tested a local adaptation of #1464 on
cbc296ab. It keeps #476's fault-saferead_ownfor every reread, preserves nonzero entries from the enqueue snapshot, and returnsE_ACCESS_VIOLATIONon an unreadable table or if zeros remain after the 50 ms wait. No upstream code or PR was changed.cbc296abSame DRED, direct DXIL, scripted A presses, starting profile and reused XCL cache location. These were separate runs, with the adapted build going second, so cache state and request timing may differ. Both reached world-loading artwork and exited at the timer with code 0. The adapted run still logged
0x89240009and did not resume presenting. Minimum system commit headroom was 24.19 GiB in the adapted run.Focused validation on Rust 1.100.0 (Windows x64):
cargo test --locked --offline -j 4 -p xcl --lib hle::dstorage:: -- --test-threads=1: 31 passed, 0 failed, 0 ignored, including the existing test of an unreadable deferred table and the late-page test from this PR. Full suite was not run. No game data included. AI-assisted (OpenAI Codex, GPT-6).@Dezmonius on GitHub · 2026-11-25 05:00 UTC · original
Warm-cache control after the local #1464 adaptation test above. I switched back to unmodified
cbc296aband kept the same 300 s limit, RTX 5070 / 610.88, offline/DRED settings, startup profile, scripted input and cache location. In run order the sampled failure counts were 1,975 on upstream, 4 with the adapted late-page wait, then 952 back on upstream. The last control logged0x89240009, 87,232 sampled requests, 825 PresentX calls and 58 trailing two-second samples at zero presents. It ended at the timer with exit 0.The failure count varies between upstream runs, but the high count returned even after the patched run warmed the same cache. All three runs still stopped presenting at world loading. No game data included. AI-assisted (OpenAI Codex, GPT-6).
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.