DirectStorage: read deferred zero mappings as native inputs #671
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!671
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-671"
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?
@Prime1997 on GitHub · 2026-11-24 03:14 UTC · original
Prime1997:fix/dstorage-lazy-read-inputs→main· +301 −3 · 4 files · 1 commits · openDirectStorage could reject a valid zero-filled memory source or a physical-page table before its first CPU access. Native reads bypass XCL's first-touch handler.
What is in it
Tested
cargo test --locked --workspace -- --test-threads=4 --nocaptureon the PR head, debug, 696 passed, 0 failed, 41 ignored. Two GPU tests emittedSKIPPEDbecause this adapter lacks wave64:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.dd2ae9athe untouched memory source and zero-filled page-table tests both failed withE_ACCESS_VIOLATION. Ond9a96fdall 19 DirectStorage tests and both existing kernelx lazy-page tests passed.Regression run
Official main:
PR head:
Not tested
AI use
I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord
@thehollowedone on GitHub · 2026-11-24 03:30 UTC · original
Tested
I tested a legal cross-page memory request through XCL’s DirectStorage queue, including enqueue, submit, worker execution, and the completion status. The first 48 bytes came from committed memory filled with
0x5a. The next 48 bytes came from a tracked zero page that was still reserved after enqueue.mainat91f9a5ecompleted withE_ACCESS_VIOLATIONand left all 96 destination bytes unchanged.d9a96fdintegrated onto that baseline, the same queued request completed withS_OKand returned the expected 48 patterned and 48 zero bytes.cargo test --offline --locked -p xcl --lib hle::dstorage -- --nocapture --test-threads=1passed 14/14 on the baseline and 20/20 with the patch. Each count includes the scratch queue fixture and its revision-specific assertion.Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug. This was a CPU-side synthetic check.
Not tested
Retail streaming, GPU timing, and the full workspace suite.
AI use
Codex with GPT-6.2 Sol wrote the scratch fixture, ran the tests, and drafted this report.
@JoaoPauluu on GitHub · 2026-11-24 04:27 UTC · original
Test report: #671 under Wine (Linux, NVIDIA): one new test fails on Wine's
ReadProcessMemorywith a guard page; GTA VI regression pairSetup
experimental-11.0-20261112(wine-11.0), vkd3d-proton v3.1 (4522cc1a) + the patch from #257, DXVK from Proton, DXC 1.9.2609,DXVK_CONFIG="dxgi.hideNvidiaGpu = False"x86_64-pc-windows-gnu(mingw-w64-gcc 16.2.0); debug for the tests, release for the runsd9a96fdand its merge basemaindd2ae9aUnit tests (lib test binary under Wine,
--test-threads=1, filterdstorage): 18 passed, 1 failed, in 2 of 2 runs.To see which protection it is, I printed each case locally (test file restored afterwards):
protectcopy_fromsnapshot_page_arrayProtectafterwardsPAGE_READONLY(0x2)Ok, zerosOk([0])PAGE_NOACCESS(0x1)Err, destination untouchedErr(E_ACCESS_VIOLATION)PAGE_READWRITE | PAGE_GUARD(0x104)Err, destination untouchedOk([0])So only the guard-page case differs:
ReadProcessMemory(GetCurrentProcess(), …)under this Wine reads a guard page and the guard is gone afterwards, so the test's last assert (Protect == protect) would fail too.read_ownonmainmakes the sameReadProcessMemorycall; the PR only adds the retry around it, so this looks like a Wine difference that the new test exposes, not something the PR changes. I didn't check other Wine versions.GTA VI 1.0.2.1 (my own dump; 60 s runs with
scripts/linux/smoke.shfrom #257,XCL_NETWORK=0, alternating base / PR / PR / base)dd2ae9ad9a96fd(The first pair.
peak commit: 0 MBis XCL reading 0 MB committed under Wine, see #257.) GTA VI's requests all succeed on both builds, so these runs don't show whether it ever hits the deferred-zero-page case.Not tested
AI use: Claude Code (Claude Opus 5.5) built both commits, ran everything above on the machine above and wrote this report. The blocks, counts and the panic are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.
@MesshM on GitHub · 2026-11-24 04:54 UTC · original
Test run of
d9a96fd1fd57314b516b452d7eb1ef7315b698e9on AMD RDNA4. I merged it onto currentmain64b3f35locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 707 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 666 passed, 0 failed, 21 ignoredSKIPPED; thedstorageandlazytests pass, the new ones included.Review: This run is on native Windows; the Wine failure reported above (Wine's
ReadProcessMemoryon a guard page) does not show up here, so it looks Wine-specific rather than a problem in the change. Preparing the reserved pages kernelx tracks and retrying the read once keeps a valid zero-filled source from being refused before its first touch. I did not trace the concurrent first-touch race the description mentions.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@PedroNunes11 on GitHub · 2026-11-24 12:41 UTC · original
Native Windows retail-title data point for
d9a96fd.Tested
XCL_NETWORK=0,XCL_ACTIVITY=1,XCL_UMA_MB=4095,XCL_COHERENT_MB=4095.d9a96fdcherry-picked ontomaine50836b(local commit16e2f17). The tree also had a four-line localXCL_NO_SYSTEM_XGAMERUNTIMEopt-out because the system XGameRuntime crashes on this machine; that change is outside DirectStorage.cargo test -p xcl --lib deferred -- --test-threads=1: 7 passed, 0 failed (including the five new deferred-input tests selected by the filter).The PR removes the deferred physical-page failures this title hits. On the immediately preceding
mainbaseline (d208e14, the only latermainchange was README), with unsupported BCPack destinations filled and reported as successful, the activity log had 1,893 failed DirectStorage requests in one 2 s interval, with representative status0x89240009. Withd9a96fdintegrated and the same local BCPack diagnostic, every activity interval reported 0 failed requests, including the heavy world-streaming intervals.It does not remove the later world-loading stall on this machine:
The local BCPack diagnostic filled unsupported blocks and reported those requests as successful; it is not proposed as a fix. Its purpose here was to isolate the remaining stall after both known DirectStorage failure classes were suppressed. The result supports
d9a96fdfixing the lazy-input failures, but shows that those failures are not the only cause of the GTA VI stall tracked in #232.Not tested
AI use
OpenAI Codex with GPT-5 built the branches, ran the tests and title, analyzed the logs, and drafted this report. The account owner requested that the useful results be posted.
@JJAutoCompare on GitHub · 2026-11-25 06:24 UTC · original
Empirical test report (
d9a96fd1)Hardware / environment
d9a96fd1fd57314b516b452d7eb1ef7315b698e9.x86_64-pc-windows-msvc. DXC 1.9.2609.5 (01b62ad47). CPU-only execution withXCL_ADAPTER=NONE_CPU_ONLY. No GPU adapter used.Commands and results
cargo test --workspace --no-runexited 0 and built the workspace test executables. Compilation only.cargo test -p xcl --lib hle::dstorage::lazy_input_tests:: -- --test-threads=1exited 0 withRUST_TEST_NOCAPTURE=1. The captured result was 6 passed, 0 failed, 0 ignored, and 671 filtered out. The log contained 0 case-sensitive lines beginning withSKIPPED.Observed behavior
Not tested
The full GPU workspace suite and game smoke runs were omitted.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr671-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 12:22 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.