hle: open DirectStorage files for overlapped reads #66
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/uiliannn--VItoriaBr!66
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-66"
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?
@LouisRiverstone on GitHub · 2026-11-25 21:32 UTC · original
LouisRiverstone:fix/dstorage-overlapped-read→main· +12 −1 · 1 files · 1 commits · openRelated to #18.
Summary
Validation
This targets cold-load and streamed-texture bottlenecks on HDD/SDD setups while preserving the existing request scheduler.
@upipibi on GitHub · 2026-11-26 23:14 UTC · original
This one is a pointer to related work in other VIctory repositories, in case it helps. I worked it out by reading the code. I have not run any of it.
At
d4b71d7, this PR changes only the flagopen_filepasses (dstorage.rs:116-119).read_intostill reads throughfile.seek_read(dstorage.rs:1109), so the reads have not become overlapped reads. The new test checks the flag constant and nothing else. Two things I could not settle by reading: whether std'sseek_readhandles completions correctly on a handle opened withFILE_FLAG_OVERLAPPEDwhen several workers read the same file at once, and whether any of this speeds anything up. Nothing in this PR measures either one.Other repositories have gone after the same serialization (one title handle, which Windows reads one request at a time):
fbc1830(on its main; at 014d52d,crates/victory-hle/src/modules/dstorage.rs:284-460):VICTORY_DSTORAGE_IO=one|handles|overlapped|direct. The default ishandles, aReOpenFilehandle for each worker.overlappedreally issuesReadFileand waits onGetOverlappedResultwith an event per thread.directis unbuffered, through a 4 KiB-aligned bounce buffer. The commit message reports 185 MB/s on one handle against 990 MB/s with a handle per worker, for 48 KiB random reads from 24 threads. There's an ignoredread_bench(:2132) and a test that every mode returns the same bytes (:2181).handlesmode. On an RTX 5070 Ti it measured 4.2 → 6.6 GB/s on a file already in the cache.b95a8a9) does the actual overlappedReadFile/GetOverlappedResultinread_into(dstorage.rs:1158-1223), but it's bundled with theVICTORY_AV_SYNCpacing work.VItoriaBr main (
1361e19,dstorage.rs:1103) still reads through the one handle. Of these, the handle-per-worker change is the smallest one that has measurements behind it.AI-assisted (Claude Code, Claude Opus 5.5).
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.