DirectStorage: XCL_DSTORAGE_IO_CONCURRENCY caps concurrent disk reads for HDDs #908
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!908
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-908"
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?
@auswhalen999-debug on GitHub · 2026-11-24 08:02 UTC · original
auswhalen999-debug:dstorage-hdd-io-concurrency→main· +141 −4 · 2 files · 2 commits · openConsole titles can drive 16+ concurrent DirectStorage file queues at once. On mechanical HDDs, issuing that many simultaneous
seek_readcalls thrashes the read heads and stalls asset streaming.This adds an opt-in
XCL_DSTORAGE_IO_CONCURRENCY=Nsetting (e.g.2for mechanical HDDs, clamped to1..=64). When unset or0(the default), disk reads remain uncapped so SSD/NVMe users see no behavior change. The semaphore gates onlyread_exact_atdisk reads while keeping CPU zlib decompression and destination copies parallel across all queues.What is in it
crates/xcl/src/hle/dstorage.rs: addparse_io_concurrency,IoLimiter/ RAIIIoPermit(Mutex<usize>+Condvarinitialized once viaOnceLock), and gateread_exact_atdisk reads (with an early return for empty reads andchecked_addoffset check).crates/xcl/src/hle/dstorage.rs(mod tests): add unit tests covering env-var parsing/clamping, bounded concurrency (limits 1 and 2) with unwind-safe permit release, and the uncapped default when unset.README.md: documentXCL_DSTORAGE_IO_CONCURRENCY.Tested
cargo test -p xcl --lib dstorage: 16 passed, 0 failed, 0 ignored (0 warnings incrates/xcl/src/hle/dstorage.rs).XCL_DSTORAGE_IO_CONCURRENCY=2compared to uncapped concurrent queue reads.Regression run
Pending: paired
scripts/smoke.ps1runs on clean builds ofmainand commitdc2143cc2614are not yet attached.Not tested
cargo test --workspacerun and pairedscripts/smoke.ps1runs on this commit (dc2143cc2614).AI use
origin/main, added the unit tests and README note, rancargo test -p xcl --lib dstorage, and drafted the PR description.@eizispark on GitHub · 2026-11-24 08:16 UTC · original
Hardware check of
dc2143cc2614ce6f6e84dc6f14b6220b8956c5b3(verified clean merge withmain09940bb): pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace -- --test-threads=4:715 passed, 3 failed, 41 ignored(GPU tests skipped on this adapter:none);placed_title_textures_share_vram_and_preserve_pixelsflaked under 4-thread shared-singleton contention (poisoningtransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory), andcargo test -p xcl --lib hle::d3d12x -- --test-threads=1passed (114 passed, 0 failed, 1 ignored)hle::dstorage::tests(16 passed, 0 failed), includingio_concurrency_parsing_defaults_to_uncapped_and_clamps_positive_values,io_limiter_caps_concurrent_holders_and_releases_on_drop, andio_limiter_is_uncapped_when_env_unsetRegression run
main(beaa245):PR (
dc2143c):Not tested
XCL_DSTORAGE_IO_CONCURRENCY=2(smoke ran on SSD with default unset concurrency); gameplay past the menusAI use
scripts/smoke.ps1harness on this machine and formatted this report.@dcastell1 on GitHub · 2026-11-24 08:27 UTC · original
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean
main@beaa245(713 passed, 0 failed, 41 ignored on this box):Three more passing tests than main: the DirectStorage IO-concurrency cap is covered and green here; nothing else changes verdict.
Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@SlopTart on GitHub · 2026-11-24 09:34 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
dc2143conto main09940bb, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 712 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. DirectStorage IO-concurrency cap green.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@Toons29 on GitHub · 2026-11-25 03:09 UTC · original
Regression run of
85c92109on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 99 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.@DavidM1911 on GitHub · 2026-11-25 09:31 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main(README.md,crates/xcl/src/hle/dstorage.rs) — needs a rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.