shadow: prune idle unreferenced exact views below EXACT_MANY under pressure #4715
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nidea1 on 2026-12-01T03:10:30Z.
What 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.