Let DirectStorage fill spare staging space across queues #886

Open
github-bot wants to merge 1 commit from github-bot/gh-886 into main AGit
Owner

@⁠Lkxex on GitHub · 2026-11-25 11:47 UTC · original
Lkxex:fix/dstorage-staging-head-of-line → main · +107 −18 · 1 files · 1 commits · open

Problem

DirectStorage admission currently picks a queue head before checking staging capacity. If the selected read needs more staging than is free, the workers wait even while another queue has a read that fits. This can serialize independent streaming requests behind a large read.

Change

Allow one already-accounted, fitting read from another queue to use the available staging budget. Reserve the next eligible admission for the blocked read to prevent a stream of small requests from continually taking its capacity. Queue-local FIFO, completion status ordering, and the existing oversized-request rule stay in place. The fallback uses the same staging accounting as ordinary dispatch.

The synthetic regression starts with 60 of 100 staging units in use. An 80-unit request is next, and a separate queue has a 20-unit request. Before the change the idle worker cannot take it. After the change it can run that request while the 80-unit read waits. A second 20-unit request cannot bypass the same blocked read.

Validation

  • The synthetic scheduler regression fails on the base commit and passes with the change.
  • cargo test --locked -p victory-hle and git diff --check.
  • No game data used. In-world asset latency and frame time were not measured. The single bypass may temporarily delay the blocked read if the smaller read is still in flight when staging is released.

AI-assisted change.

**@⁠Lkxex** on GitHub · 2026-11-25 11:47 UTC · [original](https://github.com/fxceless/victory-fork/pull/886) `Lkxex:fix/dstorage-staging-head-of-line` → `main` · +107 −18 · 1 files · 1 commits · open ### Problem DirectStorage admission currently picks a queue head before checking staging capacity. If the selected read needs more staging than is free, the workers wait even while another queue has a read that fits. This can serialize independent streaming requests behind a large read. ### Change Allow one already-accounted, fitting read from another queue to use the available staging budget. Reserve the next eligible admission for the blocked read to prevent a stream of small requests from continually taking its capacity. Queue-local FIFO, completion status ordering, and the existing oversized-request rule stay in place. The fallback uses the same staging accounting as ordinary dispatch. The synthetic regression starts with 60 of 100 staging units in use. An 80-unit request is next, and a separate queue has a 20-unit request. Before the change the idle worker cannot take it. After the change it can run that request while the 80-unit read waits. A second 20-unit request cannot bypass the same blocked read. ### Validation - The synthetic scheduler regression fails on the base commit and passes with the change. - `cargo test --locked -p victory-hle` and `git diff --check`. - No game data used. In-world asset latency and frame time were not measured. The single bypass may temporarily delay the blocked read if the smaller read is still in flight when staging is released. AI-assisted change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:53:11 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/886/head:github-bot/gh-886'
git switch 'github-bot/gh-886'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-886'
git switch 'github-bot/gh-886'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-886'
git switch 'github-bot/gh-886'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-886'
git switch 'main'
git merge --squash 'github-bot/gh-886'
git switch 'main'
git merge --ff-only 'github-bot/gh-886'
git switch 'main'
git merge 'github-bot/gh-886'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.