DirectStorage: keep unpacked file requests on disk (XCL_DSTORAGE_CACHE) #2864
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2864"
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?
Imported from ivall/xcl. Originally posted by ozimchuk on 2026-11-26T19:48:43Z.
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 #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(before the rebase):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.eaddb657, rebased ontomaind52ff48c):hle::dstorage::50 passed, 0 failed. Those includemain's newer file-input tests. The whole suite was not rerun on this head.A retail title, run on
mainb49be18plus this commit, because8b957bec's startup shader preparation (#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 (#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 (of each commit), on Linux with PowerShell 7:-Xclis a wrapper that runsxcl.exe rununder Wine 11.21 + vkd3d-proton (dxil-spirv694cc67,VKD3D_CONFIG=no_descriptor_heap) in a container capped at 24 GB of memory. The same retail title for 60 s, the cache off (the default). Wine reports no committed memory, so peak commit reads 0 MB.XCL_PSO_PRELOAD=0. With the default,maind52ff48citself (and this head) was killed at about 45 s by the container's memory limit, at about 24.8 GB resident, three times. WithXCL_PSO_PRELOAD=0,mainran the full 60 s. The DirectStorage path is the same either way.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
XCL_PSO_PRELOAD(see above). Windows, AMD, and a run past the world load (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.
Imported from ivall/xcl. Originally posted by razormontana on 2026-11-26T20:20:15Z.
Native Windows SATA validation for #2864
Clean PR head
aea330e1b892a8a737fd247af2e3606406cfa64eon8b957bec6f82495aec940944c6bf47faa02db590. The six cache fixtures passed, the opt-in file-request fallback wrote the expected synthetic payload on SATA, and both GPU cases reported in the Wine run passed together on this machine.Tested
XCL_ADAPTER=3070,XCL_NETWORK=0, and external sample variables unset.cargo test --offline --locked -j 1 -p xcl --lib --no-runbuilt successfully.cargo test --offline --locked -j 1 -p xcl --lib hle::dstorage:: -- --test-threads=1 --nocapturereported 37 passed, 0 failed, 0 ignored, and 0 explicit skips with the cache unset and again withXCL_DSTORAGE_CACHEpointing to a fresh D: folder,XCL_DSTORAGE_CACHE_MB=64, andXCL_DSTORAGE_CACHE_VERIFY=1. The opt-in run's existing budget-fallback fixture delivered its 48 KiB synthetic zlib output. The resulting data file matched the expected payload hash, and the index held an 8-byte header and one 40-byte record.cargo test --offline --locked -j 1 -p xcl --lib hle::dstorage::unpack_cache::tests:: -- --test-threads=4reported 6 passed, 0 failed, 0 ignored, and 0 explicit skips in each of two focused runs. This covers reopening a store, source-size and request-key checks, checksum failures, truncated index and data recovery, a full cache, and all 400 writes from eight producers.Review observation
By inspection,
file_closedrops the source handle. A request with a memoized store and a matching cache hit could skip the live-handle check inexecute. The file-read path returnsE_FILE_HANDLEonce the handle is closed. The committed fixtures leave this difference in Close behavior unverified. Close, cache lookup and source readNot 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.
Imported from ivall/xcl. Originally posted by ozimchuk on 2026-11-26T20:28:05Z.
@razormontana thanks for the Windows run and the review.
You're right about
Close. Once the store was set up, a request on a closed file could still be answered from the cache, where without it the request fails withE_FILE_HANDLE. In723f5a19,unpack_cache_entryreturns nothing for a closed file, so the request goes the usual way and fails as before. New test:a_closed_file_is_not_answered_from_the_unpack_cache. It fails without the fix and passes with it. All 38hle::dstorage::tests pass here (Linux, Wine, release).One request, if you have the time: the PR can't be merged without
scripts/smoke.ps1blocks from Windows, and I only have Linux. Could you run it, with any title you have:main8b957bec;723f5a19, with the cache off (the default).The same title and time for both. It would also be useful to run the PR's head twice more with
$env:XCL_DSTORAGE_CACHE = 'D:\xcl-dscache', starting from an empty folder. The first run fills it and the second reads from it;report.json→dstorage.unpack_cacheshows the hits. That part is optional.On Linux/Wine, the same script on
mainb49be18, with and without this commit and with the cache empty and full, gave 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.AI-assisted. Claude Code, Claude Opus 5.5 made the fix and the test and wrote this reply.
Imported from ivall/xcl. Originally posted by razormontana on 2026-11-26T21:26:38Z.
@ozimchuk, I reran the stock DirectStorage tests on native Windows at
68cce725538e9a5d6748e5e76eea221e1c4c15a2. The existing Close fixture and the new host-file identity and exclusive-store fixtures passed in both runs. Current-head updateFocused 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.
With
XCL_DSTORAGE_CACHEunset, 40 passed, 0 failed, 0 ignored and 0 reported skips. With a fresh D: cache (64 MiB, verification enabled), 40 passed, 0 failed, 0 ignored and 0 reported skips. The opt-in run's stored 49,152 bytes matched the synthetic fixture payload. The earlier723f5a19cf3c371de71da06888302f43ab1dfb72run passed all 38 tests in each mode.Windows retail smoke
The clean release builds pin
8b957bec6f82495aec940944c6bf47faa02db590, the PR's merge base with main, and68cce725538e9a5d6748e5e76eea221e1c4c15a2. I used the unchanged repositoryscripts/smoke.ps1, the same title and RTX 3070, fresh offline profiles, and a separate copy of the same fully prepared shader cache for each run. Both cache-off arms ran without title input and used the same arguments-Seconds 60 -StartupTimeoutSeconds 86400. The entry-to-timer markers were 55.830 s on main and 56.463 s on the PR.Main, unpack cache off
PR, unpack cache off
In this single matched pair, the PR recorded 135.8% of main's frames and 102.3% of main's peak commit. The operator observed a dark window. PresentX can count black frames, and world entry remained unverified during this short input-free smoke.
PR with the SATA unpack cache enabled
Both opted-in runs exited with
0x0and logged zero device removals, crashes, or failed requests in the activity samples. The logs showed file-backed zlib requests. The cache directory opened at the default 32,768 MiB cap. Eight per-file store attempts in each run reportedThe system cannot find the path specified. (os error 3), and requests continued through the normal read and decode path. Cache lookup and fallbackEach error immediately followed a VFS overlay redirect of the store's
.idxfile on the same thread and timestamp. The title mountsD:as the game drive. The host registers the shader cache as a VFS-owned folder, leaving the separate host unpack cache subject to that mount. The redirect expanded each 114-code-unit index path to a plain 280-code-unit path. All 16 overlay parents existed. The pinnedCreateFileWhook forwards the rewritten path as a plain string. The store opens the index before taking its lock or opening.data. Host VFS initialization · VFS mount and owned-folder rules · CreateFileW forwarding · Index openThe tested executable has no embedded long-path manifest, so the plain redirected path hits the Win32 path limit. A separate synthetic probe using the pinned VFS code reproduced the rewrite and the native
CreateFileWresult. The plain 259-code-unit path opened. Plain paths of 260 and 280 code units returned error 3, and the same 280-code-unit path opened with the Windows verbatim prefix. A read-only metadata check on all 16 saved overlay paths returned error 3 in plain form and error 2 in verbatim form, with all 16 index files still absent. Windows path-length limitsBoth
report.jsonfiles recorded zero cache bytes read or stored, zero cap or writer-queue drops and zero bad entries. The directory still held zero files after each run. Warm-cache performance remains unmeasured.AI use
Codex GPT-6.2 inspected the changes, ran the Windows tests and drafted this reply.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T22:46:25Z.
Under Wine + vkd3d-proton on an RTX 4070, at head
723f5a19, the cache stored 73,621 entries (4.9 GB) in one 120 s title run and answered 72,169 and 74,812 file requests (4.7 and 4.9 GB) in the next two runs with it, with 0 bad entries. In those two runs 90 % of the DirectStorage bytes had come 46 and 48 s after the press, against 50 and 54 s in the two runs without it, and the last presents came 4 to 8 s sooner after the press, after 5.2 GB read in all five runs.Setup:
mainb49be18+ #684 (e56dbc3, which our runs need) + this pull request's commit cherry-picked (to keep out #2555's launch pass, as in the description), release, Wine 11.21 Staging + vkd3d-proton v3.1-90-g30b0eb9b (relaxed vtables from #175, a local dxil-spirv patch), RTX 4070 12 GB, driver 615.71.09. 120 s each, in table order,XCL_PSO_PRELOAD=0, A pressed once the title presented steadily (16.0–16.5 s; 14.5 s in run 5), the first-run screens completed once, no story progress. Runs with the cache:XCL_DSTORAGE_CACHEon a local disk folder, empty before run 1,XCL_DSTORAGE_CACHE_MB=8192.report.json'sdstorage.unpack_cache; MB is the sum of the 2 s activity lines' DirectStorage MB.hle::dstoragetests passed under Wine in 3 of 3 runs.Not tested: Windows (razormontana's runs above; the smoke blocks are still pending there);
XCL_DSTORAGE_CACHE_VERIFY=0; a cache at its size cap; a changed source file in the title; thesmoke.ps1blocks; the whole test suite.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.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T02:13:29Z.
I checked overlapping Windows processes on head
723f5a19cf3c371de71da06888302f43ab1dfb72using the PR's unmodified unpack-cache module inside a standalone synthetic harness (with logging and stats shims).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.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T02:16:27Z.
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
OnceLock<Option<Store>>::None. If the initial open gives up because the sidecar is briefly busy, caching can remain disabled for that file handle's lifetime, and the current stores mutex is held during the wait. A candidate should either retry a transient busy result on a later request or deliberately document that lifetime behavior. Existing readers also do not discover another writer's new entries until reopening, and directory-wide capacity accounting remains a separate per-process issue. Older binaries that do not take the sidecar cannot coordinate with the new lock.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.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T02:19:52Z.
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.
Imported from ivall/xcl. Originally posted by ozimchuk on 2026-11-27T04:36:51Z.
@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
224ed47c(folded into the PR commit) I went for a smaller fix than coordinating the appends: a store is used by one process at a time. Opening a store takes an exclusive lock on its index file (File::try_lock,LockFileExwith fail-immediately on Windows) and keeps it while the store is open. A second process that finds the lock taken doesn't use that store: it logs this once and decodes that file's requests as without the cache. It never waits for the lock and never appends at ends it doesn't own. The store reads its index through the locked handle, and the writer thread drops its handle before a write counts as done.New test:
a_store_held_elsewhere_is_not_used_and_loses_no_entries. A second cache on the same folder (the lock is per handle, so this stands in for another process) is refused the store. The first keeps writing, and once it is gone both entries are found. It fails without the lock. All 39hle::dstorage::tests pass here (Linux, Wine, release).Still as before: the size cap is counted per process, so two processes at once can together go past
XCL_DSTORAGE_CACHE_MB. I've only tested the lock under Wine. If you can run your two-process harness on224ed47con Windows, that would cover the case I can't.AI-assisted. Claude Code, Claude Opus 5.5 wrote the fix and the test and wrote this reply.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-27T05:50:41Z.
Review: COMMENTED
The unpack cache uses the guest path as its source identity.
factory_open_fileopens through VFS, so that path can resolve to a different host file after an install or overlay change.Cache::storethen 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 keyAI 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.
Imported from ivall/xcl. Originally posted by ozimchuk on 2026-11-27T06:14:21Z.
@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
68cce725(folded into the PR commit) the store is named after the file actually opened:Cache::storetakes only the handle and hashes itsGetFinalPathNameByHandleWpath (the VFS doesn't hook it, so it's the host path after the overlay and any links) with the size and mtime as before. The guest path isn't part of the key any more, and the path isn't lowercased now, since a case-sensitive host folder can hold two files whose names differ only in case. I went with the final path rather than volume serial + file index: the 64-bit index isn't unique on ReFS (that needsFILE_ID_INFO), and some network shares and FAT don't keep it stable. Two files that exist at the same time never have the same final path, on any file system.New test:
one_guest_name_on_two_host_files_does_not_share_unpacked_bytes. One guest name is opened on two host files with different bytes and the same size and mtime (set withset_modified). The first run stores an entry for one of them. In a later run the same name opens the other file, and it must not get the first file's bytes. It fails without the fix (the second file gets the first one's payload) and passes with it. All 40hle::dstorage::tests pass here (Linux, Wine, release).Stores written before this have different names, so they're just not used again. They still count toward
XCL_DSTORAGE_CACHE_MBuntil the folder is cleared. Moving the game folder or changing its drive letter now means a cache miss, and the requests are decoded again. Still not covered: a file replaced in place at the same host path by different bytes with the same size and mtime. Size and mtime are the only change check, as before. I've only run this under Wine, not on Windows.AI-assisted. Claude Code, Claude Opus 5.5 wrote the fix and the test and wrote this reply.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T12:21:06Z.
Historical regression baseline
Tested clean
723f5a19cf3c371de71da06888302f43ab1dfb72on Windows 11 build 26200.9974, Ryzen 7 3800X, Rust 1.100.0 MSVC debug. This is the earlier PR revision before the store-locking and resolved-file identity changes. Current head68cce725538e9a5d6748e5e76eea221e1c4c15a2was outside this run.Built the synthetic probe with
cargo build --offline -j 2 --manifest-path probe/Cargo.toml. Randstorage-cache-probe.exe <mode> <synthetic.zlib>in six fresh processes for cold/warm, reopen, disabled cache, blocked root, per-file store-open failure, and zero cap. It used XCL's DirectStorage factory, native Windows file queue and status-array ABI.0x89240017), left the entire buffer untouched and left cache counters unchanged.not_stored_fullonce.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 (
gpt-6.2-sol) prepared the synthetic probe, ran and reproduced the controls, and wrote this report.Tested — native Windows cache contention
Reran the two-process file-queue check requested above on
68cce725538e9a5d6748e5e76eea221e1c4c15a2. Windows 11 build 26200.9974, Ryzen 7 3800X, NTFS, Rust 1.100.1 MSVC test profile. I reused a hash-verified test executable built from that commit with a private#[cfg(test)]fixture appended. The fixture submits synthetic zlib requests through the production DirectStorage file queue.Ran
<libtest.exe> --exact hle::dstorage::native_cache_verification::concurrent_process_file_queue --nocapture --test-threads=1in four fresh processes sharing one 64 MiB cache withXCL_DSTORAGE_CACHE_VERIFY=1. Four passed, zero failed, ignored or skipped. All four native exits were 0.S_OKwith all 4,096 output bytes and the 64-byte guard exact. The second process logged one busy notice and recorded zero hits and zero stores.Not tested
Live VFS remapping, BCPack contention, GPU execution, retail titles, performance, and the full suite.
AI use
T3 Code through the Codex harness (
gpt-6.2-sol) verified the fixture provenance, wrote the rerun controller, ran the tests and wrote this follow-up.Imported from ivall/xcl. Originally posted by ozimchuk on 2026-11-27T12:46:04Z.
@JJAutoCompare thanks, the closed-file and zero-cap results on native Windows are the cases I couldn't cover under Wine.
Since
723f5a19the head (68cce725) has had two changes, and so far I've only run them under Wine:File::try_lockon its index, and a second process decodes without the cache;GetFinalPathNameByHandleW) with its size and mtime, instead of the guest path.If your probe can run on
68cce725, these would be the useful ones on Windows:AI-assisted. Claude Code, Claude Opus 5.5 wrote this reply.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-30T02:51:13Z.
@ozimchuk this conflicts with
main(1c5acde4) incrates/xcl/src/hle/dstorage.rsandREADME.md, which keeps it out of the merge queue (#3041). Could you rebase it ontomain? The Linux branch in #3067 carries it.AI use: Claude Code (Claude Fable 5.2) made the trial merge and wrote this.
Imported from ivall/xcl. Originally posted by ozimchuk on 2026-11-30T06:09:16Z.
@Royalflamejlh thanks, rebased onto
maind52ff48c(one commit, noweaddb657).Both conflicts were with changes from
main, and I kept both sides of each:dstorage.rs:executenow reads file sources into the worker's reused buffer (Cow,MAX_CACHED_FILE_INPUT). A request the unpack cache answers still skips the read and the decode. Every other request takesmain's path unchanged.README.md: theXCL_DSTORAGE_CACHEentry now comes after the newXCL_PAGE_MAPPINGSone.hle::dstorage::: 50 passed, 0 failed (Linux, Wine, releasex86_64-pc-windows-gnu; the lib test binary run with that filter). The cache's 7 tests andmain's new file-input tests are among them. The description has a new smoke pair:maind52ff48c1,628 frames, this head 1,619, 60 s each, clean. Both ran withXCL_PSO_PRELOAD=0, because with the defaultmainitself is killed at about 45 s here by my container's 24 GB memory limit.AI-assisted. Claude Code, Claude Opus 5.5 did the rebase and wrote this reply.
Imported from ivall/xcl. Originally posted by ozimchuk on 2026-11-30T07:56:51Z.
@razormontana @Royalflamejlh @JJAutoCompare, a request if you have the time: the rebase changed the patch, so the earlier test reports no longer count for the head (#1607 lists this PR as stale), and it needs two new ones on
eaddb65729dd4aab1dd08ff6ada655fcb2b4ef89to enter #3041.The only changes since
68cce725come from the rebase:executenow reads file sources throughmain's reused buffer, and a request the cache answers still skips the read and the decode.hle::dstorage::now has 50 tests (main's new file-input tests added to the 40).@razormontana, your native Windows run would fit best, the same command as before:
For #1607 to count it, a report needs the head commit, the hardware and
N passed, 0 failed.AI-assisted. Claude Code, Claude Opus 5.5 wrote this request.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:05:24Z.
Triage (#1607) – head
eaddb65No open or merged PR adds a disk cache of unpacked DirectStorage requests.
No problems found in the diff: hits skip the read and decode only for decoded file requests of an open file, and the store key includes the host final path, size and mtime. Entries are checked against Adler-32, and the per-store file lock keeps a second process out.
Requests decoded by XCL_DSTORAGE_PARALLEL_DECOMPRESS do not use the cache. If #3325 (parallel decode by default) is merged, the cache would only see a small part of the requests.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.