D3D12.X: keep the driver-blob disk cache under 2 GiB, least recently used out first #3330

Open
Prime1997 wants to merge 3 commits from upstream-pr/3330 into main
Prime1997 commented 2026-11-29 08:40:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-29T08:40:28Z.


Requested by Prime

Nothing removed a driver blob file once written: a blob the driver refuses is dropped, but the files of every older driver, adapter, title build and translator change stay in <DXIL cache>\driver for good, and lowering the time thresholds (so more pipelines skip the driver's compile in the next run) would make it grow faster. On the PC below that folder held 3.1 GB in 13,677 files.

The first blob a run keeps now sweeps that folder once, on a thread of its own: past the cap (XCL_PSO_DISK_CACHE_MAX_MB, no cap by default: unset or 0 means none and nothing is swept) the least recently used .pso files go until three quarters of the cap are left. A file read again gets its last access time set (at most once a day), not its last write time, which the warm-replay recipes check.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: sweep / sweep_once (thread xcl-blob-sweep, info line D3D12.X: driver-blob disk cache over N MiB: removed ...), the cap from XCL_PSO_DISK_CACHE_MAX_MB, last-access marking on reads; tests the_disk_cap_comes_from_the_environment, the_least_recently_used_files_go_down_to_three_quarters_of_the_cap, a_sweep_removes_old_blobs_and_leaves_other_files
  • README.md: XCL_PSO_DISK_CACHE_MAX_MB

Tested

  • RTX 3060 Ti 8 GB (driver 32.0.16.1714), Intel Core i5-10400, 32 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0; the suite in debug, the smoke on a release build of the head commit
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with the three uma_driver tests below skipped, on 829df023be: 2608 passed, 0 failed, 49 ignored (SKIPPED GPU tests: 28 lines: 21 no wave64 (this card runs wave32), 3 a wave32 per-lane form refused by the translator (#1426), 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1), 1 no dxc.exe, 1 cannot disable the driver cache (needs Windows Developer Mode))
  • the three skipped tests on their own (cargo test -p xcl --lib -- --test-threads=1 uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment uma_driver::tests::failed_restore_stops_before_importing_an_unbacked_window): 3 passed, 0 failed. They are left out of the whole run because on this PC's driver they can end the library test process (exit 0x7c10003, "coherent window could not be restored"), on main too
  • the library harness twice more (cargo test -p xcl --lib -- --test-threads=4, same skips): 2469 passed, 0 failed; 2469 passed, 0 failed
  • the same whole run on main fa204595a4: 2605 passed, 0 failed, 49 ignored, 28 SKIPPED lines (own-prs-20261129 run, same command)
  • retail title (60 s scripts/smoke.ps1, no input, copied profile and shader cache): blocks below

Regression run

xcl-smoke v1
commit: 53e85fb124eae624641e9884517e4f3c4a7d8794
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 1453 (PresentX 1453)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 15949 MB
xcl-smoke v1
commit: 0387e92a05c6d7136d6da3bac1b04d3d7811cd2e
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 1485 (PresentX 1485)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 15682 MB

Not tested

  • AMD GPUs (this is an NVIDIA wave32 card)
  • the retail title's world: the 60 s runs end on the title's start-up screens
  • The sweep line did not appear in the 60 s smoke's log, so the sweep itself was not exercised on the retail title; it is covered by the unit tests above.

AI use

  • Claude Code wrote the change and its test, wrote this description, and ran the tests and the smoke runs on this PC. The model is not named here: this session cannot tell which model served each turn.

Optional temporary Discord for coordinating contributor work, testing and comparing results.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5549090830 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-29T08:40:28Z. --- <!-- claude-projects-attribution: {"github_login":"Prime1997"} --> _Requested by **Prime**_ Nothing removed a driver blob file once written: a blob the driver refuses is dropped, but the files of every older driver, adapter, title build and translator change stay in `<DXIL cache>\driver` for good, and lowering the time thresholds (so more pipelines skip the driver's compile in the next run) would make it grow faster. On the PC below that folder held 3.1 GB in 13,677 files. The first blob a run keeps now sweeps that folder once, on a thread of its own: past the cap (`XCL_PSO_DISK_CACHE_MAX_MB`, no cap by default: unset or 0 means none and nothing is swept) the least recently used `.pso` files go until three quarters of the cap are left. A file read again gets its last access time set (at most once a day), not its last write time, which the warm-replay recipes check. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: `sweep` / `sweep_once` (thread `xcl-blob-sweep`, info line `D3D12.X: driver-blob disk cache over N MiB: removed ...`), the cap from `XCL_PSO_DISK_CACHE_MAX_MB`, last-access marking on reads; tests `the_disk_cap_comes_from_the_environment`, `the_least_recently_used_files_go_down_to_three_quarters_of_the_cap`, `a_sweep_removes_old_blobs_and_leaves_other_files` - `README.md`: `XCL_PSO_DISK_CACHE_MAX_MB` **Tested** - RTX 3060 Ti 8 GB (driver 32.0.16.1714), Intel Core i5-10400, 32 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0; the suite in debug, the smoke on a release build of the head commit - `cargo test --workspace --no-fail-fast -- --test-threads=4` with the three `uma_driver` tests below skipped, on 829df023be71: 2608 passed, 0 failed, 49 ignored (SKIPPED GPU tests: 28 lines: 21 `no wave64` (this card runs wave32), 3 a wave32 per-lane form refused by the translator (#1426), 2 `no heap windows` (opt-in `XCL_HEAP_WINDOWS=1`), 1 `no dxc.exe`, 1 `cannot disable the driver cache` (needs Windows Developer Mode)) - the three skipped tests on their own (`cargo test -p xcl --lib -- --test-threads=1 uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment uma_driver::tests::failed_restore_stops_before_importing_an_unbacked_window`): 3 passed, 0 failed. They are left out of the whole run because on this PC's driver they can end the library test process (exit 0x7c10003, "coherent window could not be restored"), on `main` too - the library harness twice more (`cargo test -p xcl --lib -- --test-threads=4`, same skips): 2469 passed, 0 failed; 2469 passed, 0 failed - the same whole run on `main` fa204595a488: 2605 passed, 0 failed, 49 ignored, 28 `SKIPPED` lines (own-prs-20261129 run, same command) - retail title (60 s `scripts/smoke.ps1`, no input, copied profile and shader cache): blocks below **Regression run** ``` xcl-smoke v1 commit: 53e85fb124eae624641e9884517e4f3c4a7d8794 gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 1453 (PresentX 1453) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 15949 MB ``` ``` xcl-smoke v1 commit: 0387e92a05c6d7136d6da3bac1b04d3d7811cd2e gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 1485 (PresentX 1485) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 15682 MB ``` **Not tested** - AMD GPUs (this is an NVIDIA wave32 card) - the retail title's world: the 60 s runs end on the title's start-up screens - The sweep line did not appear in the 60 s smoke's log, so the sweep itself was not exercised on the retail title; it is covered by the unit tests above. **AI use** - Claude Code wrote the change and its test, wrote this description, and ran the tests and the smoke runs on this PC. The model is not named here: this session cannot tell which model served each turn. Optional temporary [Discord](https://discord.gg/6B4TykyC4W) for coordinating contributor work, testing and comparing results. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
saintwolf commented 2026-11-29 13:47:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-29T13:47:51Z.


Reviewed and tested at f80f9f8c.

Code review findings

  1. PR title contradicts the code (+ merge conflict): Currently CONFLICTING with main. Commit f80f9f8c removed the 2 GiB default (max_bytes_of(None) == None, opt-in only via XCL_PSO_DISK_CACHE_MAX_MB), so the PR title ("keep the driver-blob disk cache under 2 GiB") no longer matches what the PR does.
  2. Warm runs never sweep: sweep_once(dir) is only invoked from KeepGuard::reserve (when persisting a new slow blob). If a user sets XCL_PSO_DISK_CACHE_MAX_MB below an existing cache size and does a warm run where existing blobs hit without writing a new one, no sweep ever runs.
  3. Extra syscalls on every cache hit (driver_cache::load): load() now runs file.metadata() on every hit, and when stale (>= 24 h), touch(p) opens the file a second time by path while file is still open.

Tested locally

  • Windows 11 (build 26300), NVIDIA GeForce RTX 4070 SUPER (driver 32.0.16.2140), AMD Ryzen 7 7800X3D, rustc 1.100.0.
  • cargo test -p xcl --lib hle::d3d12x::real::driver_cache:: -- --test-threads=1: 22 passed, 0 failed.

AI use

  • Antigravity (Gemini 4 Neon) assisted with code review and drafting; all builds and tests were executed locally on the hardware above.
<!-- greyfinch-sync:ivall/xcl:comment:7256808117 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7256808117). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-29T13:47:51Z. --- Reviewed and tested at `f80f9f8c`. ### Code review findings 1. **PR title contradicts the code (+ merge conflict)**: Currently `CONFLICTING` with `main`. Commit `f80f9f8c` removed the 2 GiB default (`max_bytes_of(None) == None`, opt-in only via `XCL_PSO_DISK_CACHE_MAX_MB`), so the PR title (*"keep the driver-blob disk cache under 2 GiB"*) no longer matches what the PR does. 2. **Warm runs never sweep**: `sweep_once(dir)` is only invoked from `KeepGuard::reserve` (when persisting a new slow blob). If a user sets `XCL_PSO_DISK_CACHE_MAX_MB` below an existing cache size and does a warm run where existing blobs hit without writing a new one, no sweep ever runs. 3. **Extra syscalls on every cache hit (`driver_cache::load`)**: `load()` now runs `file.metadata()` on every hit, and when stale (`>= 24 h`), `touch(p)` opens the file a second time by path while `file` is still open. ### Tested locally - Windows 11 (build 26300), NVIDIA GeForce RTX 4070 SUPER (driver `32.0.16.2140`), AMD Ryzen 7 7800X3D, `rustc 1.100.0`. - `cargo test -p xcl --lib hle::d3d12x::real::driver_cache:: -- --test-threads=1`: **22 passed, 0 failed**. ### AI use - Antigravity (Gemini 4 Neon) assisted with code review and drafting; all builds and tests were executed locally on the hardware above.
Aniseto commented 2026-11-29 13:59:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T13:59:51Z.


Ran the driver-blob disk-cap tests at f80f9f8c on an NVIDIA Blackwell desktop part.

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40)
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5
  • Build: debug

Results

  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_disk_cap_comes_from_the_environment -- --test-threads=1: 1 passed, 0 failed, 0 ignored.
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_least_recently_used_files_go_down_to_three_quarters_of_the_cap -- --test-threads=1: 1 passed, 0 failed, 0 ignored.
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib a_sweep_removes_old_blobs_and_leaves_other_files -- --test-threads=1: 1 passed, 0 failed, 0 ignored.

What this adds
All three new tests pass: the disk cap comes from the environment, the least recently used blobs are removed down to three quarters of the cap, and a sweep removes old blobs while leaving other files alone. The PR is a draft; this is the first datapoint from an RTX 5070 Ti in the thread. These are CPU-side filesystem tests; the sweep line was not exercised in a title here.

Not tested
A retail title, a paired smoke run, the full workspace suite here, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7256959524 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7256959524). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-29T13:59:51Z. --- Ran the driver-blob disk-cap tests at `f80f9f8c` on an NVIDIA Blackwell desktop part. **System** - GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40) - CPU: Intel Core i5-12400F, 64 GB RAM - OS: Windows 11 Pro build 26200 x64 - Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5 - Build: debug **Results** - `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_disk_cap_comes_from_the_environment -- --test-threads=1`: 1 passed, 0 failed, 0 ignored. - `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_least_recently_used_files_go_down_to_three_quarters_of_the_cap -- --test-threads=1`: 1 passed, 0 failed, 0 ignored. - `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib a_sweep_removes_old_blobs_and_leaves_other_files -- --test-threads=1`: 1 passed, 0 failed, 0 ignored. **What this adds** All three new tests pass: the disk cap comes from the environment, the least recently used blobs are removed down to three quarters of the cap, and a sweep removes old blobs while leaving other files alone. The PR is a draft; this is the first datapoint from an RTX 5070 Ti in the thread. These are CPU-side filesystem tests; the sweep line was not exercised in a title here. **Not tested** A retail title, a paired smoke run, the full workspace suite here, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - ran the commands above on this machine and wrote this report; no game data was used.
Aniseto commented 2026-11-29 19:36:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T19:36:43Z.


Re-ran the driver-blob disk-cap tests at 0387e92a after the head moved from f80f9f8c (a merge of main bc2cbb72); this is a new response in the same thread, not an edit of my earlier report: https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7256959524

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40)
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5
  • Build: debug

Results

  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_disk_cap_comes_from_the_environment -- --test-threads=1: 1 passed, 0 failed, 0 ignored.
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_least_recently_used_files_go_down_to_three_quarters_of_the_cap -- --test-threads=1: 1 passed, 0 failed, 0 ignored.
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib a_sweep_removes_old_blobs_and_leaves_other_files -- --test-threads=1: 1 passed, 0 failed, 0 ignored.

What this adds
All three tests still pass on the merged head: the cap comes from the environment, LRU files are removed down to three quarters of the cap, and a sweep removes old blobs while leaving other files alone. This adds the new head and driver 32.0.16.2140 as dimensions; no title run was made and the sweep line was not exercised in a title.

Not tested
A retail title, a paired smoke run, the full workspace suite here, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7261416607 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7261416607). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-29T19:36:43Z. --- Re-ran the driver-blob disk-cap tests at `0387e92a` after the head moved from `f80f9f8c` (a merge of `main` `bc2cbb72`); this is a new response in the same thread, not an edit of my earlier report: https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7256959524 **System** - GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40) - CPU: Intel Core i5-12400F, 64 GB RAM - OS: Windows 11 Pro build 26200 x64 - Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5 - Build: debug **Results** - `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_disk_cap_comes_from_the_environment -- --test-threads=1`: 1 passed, 0 failed, 0 ignored. - `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib the_least_recently_used_files_go_down_to_three_quarters_of_the_cap -- --test-threads=1`: 1 passed, 0 failed, 0 ignored. - `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib a_sweep_removes_old_blobs_and_leaves_other_files -- --test-threads=1`: 1 passed, 0 failed, 0 ignored. **What this adds** All three tests still pass on the merged head: the cap comes from the environment, LRU files are removed down to three quarters of the cap, and a sweep removes old blobs while leaving other files alone. This adds the new head and driver 32.0.16.2140 as dimensions; no title run was made and the sweep line was not exercised in a title. **Not tested** A retail title, a paired smoke run, the full workspace suite here, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - ran the commands above on this machine and wrote this report; no game data was used.
KOLESNiii commented 2026-11-29 22:39:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T22:39:33Z.

Review: COMMENTED


Static review of f80f9f8c for the stack in the #3041 comparison.

I independently reached the same warm-cache finding as saintwolf on the measured revision. A user who sets or lowers XCL_PSO_DISK_CACHE_MAX_MB can remain over the limit indefinitely on cache-hit-only runs, because sweep_once is reached only when a new blob qualifies for saving.

Review assisted by Codex (GPT-6, exact variant unavailable). No new build or GPU run for this review.

<!-- greyfinch-sync:ivall/xcl:review:6105175759 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330#pullrequestreview-6105175759). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-29T22:39:33Z. **Review:** COMMENTED --- Static review of `f80f9f8c` for the stack in the [#3041 comparison](https://github.com/xcl-dev/xcl/issues/3041#issuecomment-7263214809). I independently reached the same warm-cache finding as [saintwolf](https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7256808117) on the measured revision. A user who sets or lowers `XCL_PSO_DISK_CACHE_MAX_MB` can remain over the limit indefinitely on cache-hit-only runs, because [`sweep_once`](https://github.com/xcl-dev/xcl/blob/f80f9f8c/crates/xcl/src/hle/d3d12x/real.rs#L6759-L6766) is reached only when a new blob qualifies for saving. Review assisted by Codex (GPT-6, exact variant unavailable). No new build or GPU run for this review.
bmjask commented 2026-11-29 22:43:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T22:43:27Z.

Review: COMMENTED


Critical review of current head 0387e92a. Behavior does not match the PR title: max_bytes_of(None) returns None; there is no default 2 GiB cap. More materially, sweep_once runs only when reserving a newly saved slow blob. A cache-hit-only run can stay above a newly configured cap forever. Trigger a sweep when the cache directory is first opened/read and test a warm cache already over limit. Please also avoid metadata on every hit if the touch decision can be cached. These points are present in the existing review; they still apply to this head. No local Windows run.

<!-- greyfinch-sync:ivall/xcl:review:6105190813 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330#pullrequestreview-6105190813). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-29T22:43:27Z. **Review:** COMMENTED --- Critical review of current head `0387e92a`. **Behavior does not match the PR title:** `max_bytes_of(None)` returns `None`; there is no default 2 GiB cap. More materially, `sweep_once` runs only when reserving a newly saved slow blob. A cache-hit-only run can stay above a newly configured cap forever. Trigger a sweep when the cache directory is first opened/read and test a warm cache already over limit. Please also avoid `metadata` on every hit if the touch decision can be cached. These points are present in the [existing review](https://github.com/xcl-dev/xcl/pull/3330); they still apply to this head. No local Windows run.
Foniass commented 2026-12-01 03:58:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:58:32Z.


Review (head 0387e92a, diff read, not a merge-check; draft, so not built or run):

  • The default (no cap) still pays extra I/O on every disk hit. load (real.rs ~6591) calls metadata() on each hit and, for a file a day old or more, opens it and sets its access time, whether or not XCL_PSO_DISK_CACHE_MAX_MB is set. That's on the bind path, possibly on title threads, and isn't measured. Gating it on max_bytes() would keep the default as it was.
  • With a cap, the sweep can delete what xcl shaders just counted. It starts at the first KeepTurn (~6785) and can remove .pso files the recipe index (shaders.rs ~3959) already counts as verified, so the prep reports them prepared and the next run compiles them again.
  • A run that keeps no new blob never sweeps, so a warm cache over the cap stays over it.
  • The title says "under 2 GiB" but there's no cap by default; the suite ran on 829df023, not the head; the branch has a fixup commit and a merge of main (squash and rebase). AI use should name the model.
  • It interacts with #3328: that PR moves more reuse onto these disk files, which this one can evict.

Fine: the to_remove arithmetic and its test, staging .tmp* files and receipts are left alone, the access-time touch leaves the warm_replay stamp (length, creation, write time) unchanged, readers open with FILE_SHARE_DELETE so deleting under a reader is safe, and the listing uses find data on its own thread.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7300250529 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7300250529). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:58:32Z. --- Review (head 0387e92a, diff read, not a merge-check; draft, so not built or run): - **The default (no cap) still pays extra I/O on every disk hit.** `load` (`real.rs` ~6591) calls `metadata()` on each hit and, for a file a day old or more, opens it and sets its access time, whether or not `XCL_PSO_DISK_CACHE_MAX_MB` is set. That's on the bind path, possibly on title threads, and isn't measured. Gating it on `max_bytes()` would keep the default as it was. - **With a cap, the sweep can delete what `xcl shaders` just counted.** It starts at the first `KeepTurn` (~6785) and can remove `.pso` files the recipe index (shaders.rs ~3959) already counts as verified, so the prep reports them prepared and the next run compiles them again. - A run that keeps no new blob never sweeps, so a warm cache over the cap stays over it. - The title says "under 2 GiB" but there's no cap by default; the suite ran on 829df023, not the head; the branch has a fixup commit and a merge of main (squash and rebase). AI use should name the model. - It interacts with #3328: that PR moves more reuse onto these disk files, which this one can evict. Fine: the `to_remove` arithmetic and its test, staging `.tmp*` files and receipts are left alone, the access-time touch leaves the `warm_replay` stamp (length, creation, write time) unchanged, readers open with `FILE_SHARE_DELETE` so deleting under a reader is safe, and the listing uses find data on its own thread. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 16:13:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T16:13:34Z.


Test report (not a merge-check: draft)
base: b2b1f109d2
head: 0387e92a05
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2905 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: not repeated here; my review of this same head is at https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7300250529, and its findings stand. This run adds what reading couldn't: whether the change merges, builds and passes the whole suite on current main.
performance: no smoke run.
assessment: merges, builds and passes the whole suite on current main (0 failed); the findings in my review stand
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7317244511 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7317244511). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T16:13:34Z. --- Test report (not a merge-check: draft) base: b2b1f109d27e746a62ec95b04dd1f9924452e682 head: 0387e92a05c6d7136d6da3bac1b04d3d7811cd2e merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2905 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: not repeated here; my review of this same head is at https://github.com/xcl-dev/xcl/pull/3330#issuecomment-7300250529, and its findings stand. This run adds what reading couldn't: whether the change merges, builds and passes the whole suite on current main. performance: no smoke run. assessment: merges, builds and passes the whole suite on current main (0 failed); the findings in my review stand hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3330:upstream-pr/3330'
git switch 'upstream-pr/3330'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/3330'
git switch 'upstream-pr/3330'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3330'
git switch 'upstream-pr/3330'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3330'
git switch 'main'
git merge --squash 'upstream-pr/3330'
git switch 'main'
git merge --ff-only 'upstream-pr/3330'
git switch 'main'
git merge 'upstream-pr/3330'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3330
No description provided.