Keep unstaged DirectStorage reads moving under staging pressure #1187
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1187"
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?
Imported from Marvisak/VIctory. Originally posted by Jitheswar on 2026-11-24T16:22:23Z.
The 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
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:32Z.
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).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:34:14Z.
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