DirectStorage: reuse small sequential file input buffers #2530
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!2530
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2530"
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?
@razormontana on GitHub · 2026-11-25 21:47 UTC · original
razormontana:directstorage/reuse-small-file-input-staging→main· +119 −14 · 3 files · 1 commits · openPart of #1833. The default DirectStorage worker allocates and zeroes an input buffer for every file request. A worker now retains up to 64 KiB of initialized input storage and reuses it across requests. Larger reads use a temporary buffer.
What is in it
crates/xcl/src/hle/dstorage.rskeeps a worker-local buffer and passes the exact bytes of each successful read to the existing decode and delivery paths. The opt-in decompression pool uses its existing staging budget.crates/xcl/src/hle/dstorage/parallel_tests.rschecks allocation reuse at the high-water size, reads beyond the cache size, and FIFO status and destination bytes after a short read.Tested
73643dae7e179eb0dfc2c27d3503aff7e2351f34.cargo test --offline --locked -j 2 -p xcl --lib hle::dstorage:: -- --test-threads=1 --nocapturepassed 34 tests with zero failures, ignored tests, or skips both with default settings and withXCL_DSTORAGE_PARALLEL_DECOMPRESS=1. With the new tests and the old allocation path, the high-water assertion failed and the short-read compatibility case passed.cargo build --offline --locked --workspaceandcargo build --offline --locked --release --workspacesucceeded. The debugcargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputrun withXCL_ADAPTER=3070reported 1,426 passed, 0 failed and 46 ignored across 37 targets. The pass count includes 26SKIPPEDnotices (21 native-wave64 checks, 3 unsupported per-lane forms, 1 reserved cube with mips and 1 heap-window check).Regression run
Both clean release builds ran
scripts/smoke.ps1 -Game <folder> -Seconds 60on the same retail title in the Series S profile on the RTX 3070. They usedXCL_DIRECT_DXIL=1, networking off and identical starting copies of XCL's warmed cache. NVIDIA's driver cache settings were left at their defaults.Main
Candidate
Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 22:08 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@xpatfussy69x on GitHub · 2026-11-25 22:40 UTC · original
Test run on exact head
73643da(73643dae7e179eb0dfc2c27d3503aff7e2351f34, on its base6d12f58), clean tree.Tested
cargo test --workspace -- --test-threads=4: 1426 passed, 0 failed, 46 ignoredV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32(onmaintoo)cargo test -p xcl --lib sequential: 4 passed, 0 failedsequential_file_input_reuses_its_high_water_allocation: okan_oversized_sequential_file_input_does_not_grow_the_cache: oksequential_short_read_preserves_destination_and_the_next_request_completes: okRegression run (60 s, default settings, a retail title)
main:
this PR:
No crash or device removal; frames 104 % of
main's, peak commit 100 %.Not tested
main(tested on its own base; it merges intoe1d84b7without conflicts)AI use
@SlopTart on GitHub · 2026-11-25 23:27 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Targeted run of the DirectStorage sequential/reuse tests: 6 passed, so the reused buffer path is covered on the Wine lane too.
Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@emirduran707 on GitHub · 2026-11-25 23:32 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
73643dae7e179eb0dfc2c27d3503aff7e2351f34on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1424 passed, 2 failed, 46 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::dstorage::parallel::tests::an_oversized_sequential_file_input_does_not_grow_the_cachehle::dstorage::parallel::tests::sequential_file_input_reuses_its_high_water_allocationhle::dstorage::parallel::tests::sequential_short_read_preserves_destination_and_the_next_request_completesgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
main08db8020on this machine:1553 frames, 13966 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
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.