Sweeps behind flights every 15 s while memory is not pressed (a 36-100 ms frame every 1.5 s) #340
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/trustno1-coder--VIctory-NVIDIA!340
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-340"
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?
@bentsignal on GitHub · 2026-11-27 21:13 UTC · original
bentsignal:sweep-every→main· +42 −1 · 1 files · 2 commits · openWhat this fixes
A regular stutter: about one frame in every 1.5 s took 36-100 ms instead of ~31, even standing still.
With the present sent ahead (
late_free_present),submitmakes a moment with nothing in the air for the sweep every 1.5 s. It does that by settling every flight first, so that frame waits for the card to drain. A 45-frame timeline (VICTORY_TIMELINE) of the prologue's cell put the two longest frames on it:With
VICTORY_SWEEP=0there was no frame over 50 ms at all. The sweep can't simply go, though: it is what lets idle host copies, staging buffers and textures go.The change
Host::sweep_every_mssets how often a sweep is made behind flights:VICTORY_SWEEP_EVERY_MS, 15,000 by default; 1,500 restores the old cadence) while memory is not pressed;residency::pressured(), or the card's use, less the texture pool's free part, at or overresource::room_line(the line textures are made up to). From that line on, textures are held back for room, and the sweep is what frees idle ones. The first version used 97 % of the budget instead, which left textures waiting between ~93 % and 97 %.It is looked at twice a second, and the log says when it switches (
sweeps behind flights pressed=... every_ms=...). Sweeps that need no settle (nothing in the air anyway) are unchanged.Measured
RTX 5070 Ti 16 GB, Ryzen 9 9900X, 61.6 GB RAM, Windows 11. Series X profile, 2560x1440, DLSS Quality, release, pipelines warmed. Prologue cell, 40 s steady state, frame times from the present intervals:
VICTORY_SWEEP=0)The first two columns are without frame generation; the third is from five runs with it.
The last column also needs memory not to be pressed. On this PC that needed a separate fix to how commit is counted (a separate PR, "Residency: count what the pagefiles can still grow by as commit left"). Without it, the residency pressure stays on and the sweep keeps its 1.5 s pace, which is the same as today.
Tests
cargo test -p victory-gpu --lib: same results asmain(indirect::tests::host_list_budget_starts_empty_at_each_submissionandwarp_batch_charges_every_executionfail onmaintoo).watch::tests::what_is_put_in_beside_the_guards_is_told_at_every_viewfailed once in a full run and passed alone, on this branch and onmain.cargo clippy -p victory-gpu --all-targets: no new warnings.Setup
Own dump of the title. No game files are attached or quoted.
This change and its testing were done with an AI assistant (Claude Code), and the results were checked on my machine.
🤖 Generated with Claude Code
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.