Keep unstaged DirectStorage reads moving under staging pressure #1187
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1187
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1187/head"
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?
@Jitheswar on GitHub · 2026-11-24 16:22 UTC · original
directstorage-unstaged-reads→main· +80 −17 · 1 files · 1 commits · closed without mergingThe DirectStorage scheduler starts reads in fair order: the class with the least virtual time, then its lane with the fewest bytes started. When the read at the head needed more staging than was free,
startreturned nothing. Every other queued read then waited too, including reads that need no staging at all (uncompressed reads, and reads from memory sources). One large compressed read could stall unrelated raw reads until staging drained.What changes
startstill picks the next read in scheduler order. If that read must wait for staging, it now looks for the next read in the same order that needs no staging and starts that instead. The waiting read keeps first claim on staging: nothing else that needs staging can start ahead of it.max), and newly active queues don't inherit an earlier time.Tests (synthetic):
staging_wait_does_not_block_an_independent_raw_read: a queue whose staged read is waiting for space still lets another queue's raw read start. A second staged read doesn't jump ahead of the waiting one. When the first read finishes, the waiting read starts and the clock doesn't move backwards.oversized_buffered_read_can_run_alongside_an_unstaged_read: a read larger than the whole staging buffer runs alone in staging, while a memory-source read alongside it uses none.victory-hletests for the Windows target under Proton 11, merged onto940d32f: 143 passed / 2 failed. Plain940d32fgives 141 / 2 with the same two failures (only_loopback_is_reachableanda_kept_blob_past_the_link_limit_is_copied, both Wine-host gaps); this PR adds the 2 new tests above. Windows-target clippy is clean. Not run in the game for this change specifically. Merges cleanly onto940d32f.AI-assisted (Claude Code, Codex).
🤖 Generated with Claude Code
@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
bcfd293:cargo test -p victory-hlepasses, 97 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 00:34 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1457. The same scheduler change as #1457 (a read that needs no staging may start while a staged one waits), with no description at all.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed