shadow: prune idle unreferenced exact views below EXACT_MANY under pressure #4716
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4716
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4715"
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?
@nidea1 on GitHub · 2026-12-01 03:10 UTC · original
nidea1:fix/shadow-exact-trim-under-pressure→main· +82 −2 · 1 files · 1 commits · openWhat it changes
Under host memory pressure,
ExactStore::trim()incrates/victory-gpu/src/shadow.rspreviously only drained already-graduated pool buffers and left idle unreferenced exact-view map entries pinned indefinitely whenever total entries stayed belowEXACT_MANY(256).pressuredis true and the store is non-empty (self.count.load(Ordering::Relaxed) > 0),ExactStore::trim()now evicts idle unreferenced entries (last_frame + EXACT_IDLE_FRAMES <= now,Arc::strong_count == 1,host::references == 1) even belowEXACT_MANY, retiring the evicted shadows viahost::retire(shadow)outside all locks (matching existingmaybe_prunesemantics).count == 0) sotrim()under pressure does not acquiremap.write()unnecessarily.How it was tested
--fg-type fsr --framegen 3), ray tracing off,VICTORY_SAMPLED_EVICT=1,VICTORY_WINDOW_GROW=1,VICTORY_POOL_SMALL=0,VICTORY_RIPE_BLOCKS=12.ExactStore::trim()left idle unreferenced exact views belowEXACT_MANY(256) retained indefinitely.trim()under pressure skips acquiringmap.write()when empty, evicts idle unreferenced entries belowEXACT_MANY, and retains active/referenced entries.720.7 sin-world,16,447frames) uncontested live soak on7d93ee0759(combined 14-branch local stack) with0crashes,0device losses,0Victory errors,HERO LEAD = 0,UPLOAD OVER HOST WRITE = 0, and0memory leaks (process PrivateBytes and Shared GPU RAM flat/decreasing across M03–M13).cargo testpassed for the crates it touches: yes (on2e74dffc, base7d93ee0759)cargo test -j 2 -p victory-gpu --locked --lib shadow::: 86 passed, 0 failed, 6 ignored (new:empty_exact_store_trim_under_pressure_skips_map_write_lock[bare-runner safe] andexact_trim_under_pressure_evicts_idle_entries_below_many_and_keeps_active)cargo clippy -j 2 -p victory-gpu --all-targets --locked -- -D warningsand--all-features: 0 warnings on7d93ee0759(note: currentmain5fabb46ehas 5 pre-existing clippy errors infont.rs/menu.rs/panel.rsfrom#4634, tracked in#4679/#4707).cargo xtask policy: 464 files ok (--staged: 1 file ok).Checked for overlap
crates/victory-gpu/src/shadow.rs(#4242,#4636,#4145,#4305,#4558,#2910,#4682, etc.); none touchExactStore::trim()or prune idle exact views belowEXACT_MANYunder pressure.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.