Repository navigation
Conversation
|
Native Windows SATA validation for #2864 Clean PR head Tested
cargo test --offline --locked -j 1 -p xcl --lib -- --exact hle::d3d12x::list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory --test-threads=4 --nocaptureReview observation By inspection, Not tested Retail playback or smoke, sustained SATA throughput, warm cache hits through the file-request queue, Windows release builds, and the full-workspace or full-library scheduling conditions from the Wine report. AI use Codex GPT-6.2 inspected the source and fixtures, ran the tests, checked the stored synthetic output, and drafted this report. |
aea330e to
723f5a1
Compare
|
@razormontana thanks for the Windows run and the review. You're right about One request, if you have the time: the PR can't be merged without .\scripts\smoke.ps1 -Game <title folder> -StartupTimeoutSeconds <enough for the shader preparation>
The same title and time for both. It would also be useful to run the PR's head twice more with On Linux/Wine, the same script on AI-assisted. Claude Code, Claude Opus 5.5 made the fix and the test and wrote this reply. |
|
@ozimchuk, I confirmed the Close fix at Focused Windows tests Windows 11 Pro 23H2 (22631.5335), i7-10700K, RTX 3070 8 GB on driver 617.42, Rust 1.100.0 x86_64-pc-windows-msvc, debug tests and D: SATA. Here is the command I ran. cargo test --offline --locked -j 1 -p xcl --lib hle::dstorage:: -- --test-threads=1 --nocaptureEach run passed all 38 tests, including Windows retail smoke Clean release builds succeeded on A third guarded main run used the stock script's 24-hour startup allowance with no local preparation deadline. I stopped it at the operator's request after 3 h 42 min, during shader preparation. The saved shader cache is available for a later run. The paired cache-off AI use Codex GPT-6.2 inspected the fix, ran the Windows tests and drafted this reply. |
|
Under Wine + vkd3d-proton on an RTX 4070, at head Setup:
Not tested: Windows (razormontana's runs above; the smoke blocks are still pending there); AI use: Claude Code (Claude Opus 5.5) ran the title and the tests and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
…triaged SKIP, probe past xcl-dev#2864)
xcl-dev#2864 re-pinned, probe past xcl-dev#2873)
|
I checked overlapping Windows processes on head Two processes opened the same synthetic source and cache directory before either wrote. Each then stored a different request with a distinct 256-byte payload, with verification enabled; process B wrote after A finished. Both reported one stored request, but a fresh reader recovered only B's entry in 3/3 trials. When B opened after A's write, a fresh reader recovered both. Individual writes did not overlap in this test. Each store captures its data and index ends when opened and appends at those per-process offsets. All payloads returned to the reader matched their expected bytes. This demonstrates a missed cache entry and possible repeat decode, not wrong returned data. No title, GPU workload, or retail timing was tested. AI use: OpenAI Codex with GPT-6.2 Astra inspected the code and ran the synthetic controls; Codex coordinated and prepared this report. |
|
Follow-up to my overlapping-writer report: a local candidate uses a stable per-store sidecar lock for initialization/repair and paired appends, then refreshes physical file ends under the lock. In three synthetic overlapping-process trials it retained both entries; the sequential control and seven cache-module tests also passed, including a live reader retaining its earlier bytes after another writer appends. An independent review found an important integration caveat: the current caller stores an open failure as These are local synthetic tests and source review, not retail throughput or GTA VI measurements. AI use: OpenAI Codex with GPT-6.2 Astra implemented and independently reviewed the candidate; Codex coordinated and prepared this follow-up. |
|
Follow-up to the transient-open caveat: a revised local candidate leaves the per-file cache cell uninitialized when the initial sidecar lock is busy. That request falls back to normal decoding; a later request on the same file handle can retry. Permanent open failures retain the existing behavior. In a caller-level synthetic test with a real held Windows sidecar lock, the first lookup did not initialize the cell. After releasing the lock, a second request on the same handle stored and read the expected 4,096 bytes. All 40 DirectStorage module tests passed, and 3/3 overlapping-process controls still retained both cache entries. An independent review found no lock-order blocker. Lock acquisition on the initial caller is nonblocking; ordinary metadata/index I/O may still block. Directory-wide size accounting and coordination with older binaries remain separate limitations. Retail throughput and GTA VI were not tested. AI use: OpenAI Codex with GPT-6.2 Astra implemented, tested and independently reviewed the local candidate; Codex coordinated and prepared this follow-up. |
723f5a1 to
224ed47
Compare
|
@andrewDoing thanks, that's a real gap: each store appended at the file ends it saw when it opened, so a second process with the same folder could overwrite the first one's entry. In New test: Still as before: the size cap is counted per process, so two processes at once can together go past AI-assisted. Claude Code, Claude Opus 5.5 wrote the fix and the test and wrote this reply. |
luckyteagirl
left a comment
There was a problem hiding this comment.
The unpack cache uses the guest path as its source identity. factory_open_file opens through VFS, so that path can resolve to a different host file after an install or overlay change. Cache::store then combines the original guest name with only the opened file's size and mtime. If two files share those metadata, the second file can receive decoded bytes from the first even with checksum verification enabled. I compiled the exact cache module and tested two distinct Windows files with matching size and mtime. After closing and reopening the cache under the same simulated guest name, the second file's request hit the first file's payload. Could the store key include the resolved identity of the opened file, with a regression covering two VFS sources for one guest path? VFS file opening · Store key
AI use: OpenAI Codex (GPT-6.2 Sol) reviewed the source, ran the synthetic Windows cache harness, and drafted this comment. The fixture seeds decoded bytes directly. It does not run the VFS, decoder, or a GPU workload.
A title streams the same compressed data again and again, in one run and in every later one, and XCL decodes it on the CPU each time (zlib, then BCPack). With XCL_DSTORAGE_CACHE=<folder> the unpacked bytes of a decoded file request are kept in the folder and read back the next time the same request comes: same file (path, size, modification time of the host file actually opened, after the VFS), offset, source size and decoding. One store per source file (an append-only data file and an index of fixed records, each with the entry's Adler-32); a record without all its bytes, a cut record or bytes that do not match their checksum are not used. New entries are written by a thread of their own (at most 256 MiB queued), so a request never waits for the disk. No eviction: entries stop once the folder holds XCL_DSTORAGE_CACHE_MB (default 32,768). report.json counts hits and stored entries. XCL_DSTORAGE_CACHE_VERIFY=0 skips the check on reads. A store is used by one process at a time: it holds a lock on its index file while open, and another process using the same folder decodes that file's requests as without the cache instead of appending at file ends it does not own. Assisted-by: Claude Code (Claude Opus 5.5)
224ed47 to
68cce72
Compare
|
@luckyteagirl thanks, you're right: the store was named after the guest path the title opened, and through the VFS that name can open a different host file (an overlay copy, another install). Two such files with the same size and mtime shared one store, and the Adler-32 couldn't catch it because it checks the stored bytes, not where they came from. In New test: Stores written before this have different names, so they're just not used again. They still count toward AI-assisted. Claude Code, Claude Opus 5.5 wrote the fix and the test and wrote this reply. |
|
Historical regression baseline Tested clean Built the synthetic probe with
Six process controls passed, with zero process failures or runtime skips. CPU/storage only. Store concurrency, resolved-file identity, injected writer failure, retail smoke and the full suite were outside this run. AI use T3 Code / Codex ( |
A title streams the same compressed data again and again, within one run and in every later one, and XCL decodes it on the CPU each time (zlib, then BCPack). With
XCL_DSTORAGE_CACHE=<folder>, XCL keeps the unpacked bytes of each decoded file request in that folder and reads them back the next time the same request comes. Off by default. Part of #2863.A request counts as the same when it names the same file (the host file actually opened, after the VFS: its path, size and modification time), the same offset and source size, and the same decoding (zlib and BCPack bits, intermediate and destination sizes). Requests from memory sources and plain copies are not kept. A request on a closed file fails with
E_FILE_HANDLEas before, kept bytes or not.What is in it
crates/xcl/src/hle/dstorage/unpack_cache.rs(new):GetFinalPathNameByHandleW), size and modification time: an append-only data file and an index of fixed 40-byte records, each with the entry's Adler-32.bad_entries).XCL_DSTORAGE_CACHE_MB(default 32,768).File::try_lock) while open. Another process using the same folder decodes that file's requests as without the cache, and never waits for the lock.dstorage.rs: one guest name on two host files with the same size and time does not share unpacked bytes.crates/xcl/src/hle/dstorage.rs:executeasks the cache before reading and decoding a file request, and gives it the result after.FileInnerkeeps the file's store. A closed file gets no cache entry (test:a_closed_file_is_not_answered_from_the_unpack_cache).report.json→dstorage.unpack_cachecounts hits, stored entries, entries not stored (full or busy) and bad entries.README.md: the three variables.694 changed lines, about 280 of them unit tests. The cache cannot be split from its use in
executeand still be testable in a run.Tested
NVIDIA (32-lane waves), driver 595.99.02, Ryzen 5 9600X. Linux (Ubuntu 24.04) with Wine 11.21 + vkd3d-proton (dxil-spirv
694cc67), not Windows. Release build forx86_64-pc-windows-gnu, Rust 1.100.0.cargo test -p xcl --lib --release -- --test-threads=4(the test binary under Wine, with the relaxed vkd3d-proton from Linux (Wine + vkd3d-proton): a retail game reaches whatmainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175) onaea330e1, this PR's first head (before theClosefix): 1,312 passed, 12 failed, 27 ignored. 25SKIPPED, mostlyno wave64.main8b957bechere: 8 test-data and validator cases ingpu::rdna2,gpu::dxil,gpu::recomp, plusbcpack::tests::fixtures_decode_to_their_lanesanddevice_x::tests::gpu_promoted_uav_clear_values_pass_create_committed_resource.list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_sparesandvram::tests::d32s8_targets_take_their_own_size_of_video_memory, pass when run alone.main's own run hung twice invramGPU tests after a GPU fault (1,305 passed and the same 10 failed before that). So I have no completemaincount to compare with.68cce725):hle::dstorage::40 passed, 0 failed (unpack_cache7 of them). TheClosetest fails without its fix, the held-store test without the lock, and the two-host-files test without the host-path key.A retail title, run on
mainb49be18plus this commit, because8b957bec's startup shader preparation (xcl run: prepare shaders in the game window before title execution #2555) takes longer than a run here. The DirectStorage code is identical between the two. A local counter timed the decode stages. Each run ends at ~95 s inmain's own crash (XG CopyFromSubresource: retail title passes one argument more → memcpy AV in copy_from; then null write at game+0x23cf683 at end of loading #662; the same with the cache off).XCL_DSTORAGE_CACHE_VERIFY=0One run per cell. "Request time" sums the time requests spent on the queue's worker thread (read, decode, cache, copy). The first run costs about the same as no cache, since the writes go to a thread of their own. The read check costs 1.2–2.6 s per 3.8–4.9 GB read back. No entry failed it.
Frames presented were about the same in all runs (title screens at 30 fps). No run had a device removal before the crash. Cache folder after one run: about 4–5 GB per console mode.
Regression run
scripts/smoke.ps1unchanged, on Linux with PowerShell 7:-Xclis a wrapper that runsxcl.exe rununder Wine 11.21 + vkd3d-proton (dxil-spirv694cc67,VKD3D_CONFIG=no_descriptor_heap). The same retail title for 60 s, the cache off (the default).-StartupTimeoutSecondswas large enough for xcl run: prepare shaders in the game window before title execution #2555's startup preparation, which had to finish once onmainfirst (several hours here). Wine reports no committed memory, so peak commit reads 0 MB.mainb49be18, with and without this commit and with the cache empty and full: four clean 60 s runs (1,573–1,612 frames, 60 presents per 2 s, no removals or crashes; Wine reports no commit). The full cache answered all 6,507 requests.Not tested
maincrashes before it here). The store lock only under Wine, and not with two real processes.XCL_DSTORAGE_PARALLEL_DECOMPRESStogether with the cache: its requests do not use the cache.AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_01H6JBZXaFw99FcnmUV1mPWj
AI-assisted.