GPU: under memory pressure the sweep lets idle scratch chunks and pooled lists go (RAM band, commit-aware) #476
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!476
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-476"
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?
@simbaui4life on GitHub · 2026-11-27 16:30 UTC · original
simbaui4life:fix/pressure-trims→main· +922 −14 · 5 files · 2 commits · openBuilds on #473 (the memory bench): its commit is included, and only the last commit is new. It is independent of #474; both touch
host.rs, in different functions.Cause: two caches ignore memory pressure in the default setup.
SPARE_KEPT(1 GiB) withVICTORY_KEEP_FREED. They were let go only withVICTORY_RESIDENCY=1, which is off by default.Only windows react to low free RAM (
ram_idle_ms). The commit limit, where the reported crashes happen (#146, #189, #267, #465), was not looked at for either cache.What this does
sweep()now takes the RAM band (ram_band), with its hysteresis. The band looks at free RAM, commit headroom, this process's private bytes and its working set. Until now only the opt-in window budget used it.SPARE_MOST(128 MiB), and lists idle in the pool for 10 s go.list::let_go_idle).fresh_listtakes the one given last, so a busy frame keeps its lists; the 21 ms a frame of making lists anew (list.rs) is not brought back.VICTORY_PRESSURE_TRIM=0restores the old behaviour.Tested (RTX 4070 Ti, driver 621.01, debug build,
VICTORY_RELAY=2)Memory bench pressure test: a spike, then idle "told 1 GiB free". The test now asserts that spare bytes and pooled lists come down.
Private bytes fell less than the chunks let go (263 MB); the driver may keep freed upload memory for a while. I did not establish why.
With room: nothing changes, and the steady state stays flat (1057.6 → 1058.0 MB).
cargo test -p victory-gpu: 394 passed, 0 failed (37 ignored). One run of three failedwatch::tests::what_the_kernel_writes_through_is_not_guarded_for_another_view(one page guarded); it passed alone 3 of 3 and in the next full run.watch.rsis not touched; it looks like an existing order-dependent test.Clippy: adds nothing (main's existing failures are listed in #473).
Not tested:
No game data in the commits.
🤖 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.