victory-gpu: eliminate 60 ms let_go_idle sweep stutter, lock-free watch/pending hot paths & recording contention fixes #3502
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3502"
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 Rulemore on 2026-11-30T00:08:10Z.
Summary
This PR focuses on CPU hot-path, lock-contention, and periodic stutter reductions in
victory-gpu(based cleanly onv2026.11.29.05/41adb551), preserving all existing upstream defaults and behavior.Key Changes
resource::let_go_idle()60 ms Sweep Stutter & PassiveBufferSweep(resource.rs,shadow.rs,descriptor/host.rs,draw.rs,host.rs)resource::let_go_idle()from 22.89 ms avg / 59.9 ms max → 1.83 ms avg / 3.5 ms max (12.5× faster).shadow::find_passiveso backgroundBufferSweeppasses do not advanceShadow::used/Shadow::frameson cold bindless slots.try_wide_each_scopedwithNESTED_LONGfallback), dropping CPU refresh time from 15.5 ms → 10.6 ms.watch&shadowHot Paths (watch.rs,shadow.rs,host.rs,host/card_steps.rs,descriptor.rs)watch::OWNED(withRwLockoverflow fallback) and lock-freePageEpochs::try_parts_sincefast path before falling back tojournal().ahead_snapintoShadow::nothing_new_withand fixes read-only lock usage.pending_boundsmin/max fast-path onShadowto skip lockingpendingfor disjoint ranges, batchesconstant_slots_part, removes per-call allocations incard_steps::plan_with, and sifts ranges in place.host.rs,list.rs,draw.rs,pipeline.rs,streamline.rs,descriptor/host.rs,memory.rs)HostListCOM interfaces and returnsHostPipelinedirectly fromprepare.AddressHashforHostListstates/twins,RwLockforSHADERS, deduplicatesLIVEPSOs, and avoids redundantGetDesccalls in transitions.quiet_waits/barstatinto narrow barriers, and skips redundantTextureQueueinsert/remove churn on table reads (QueueBatch::LIMIT = 256).stale_pagestoO(P + log W), cachesin_buffer, offloads relayland()tolate_helper, cachesVICTORY_DLSS_RANGE, gatesSEENlock, and properly retiresfg_rectbuffers.Measurements (RTX 4070 SUPER, release build)
resource::let_go_idle()sweep spikes: 22.89 ms avg / 59.9 ms max → 1.83 ms avg / 3.5 ms max (−92% stutter).Verification
cargo test -p victory-gpu --lib -- --test-threads=1(including new testsowned_seqlock_tracks_ranges_and_overflow_fallback,page_epochs_lockfree_parts_since_handles_single_multi_and_whole,pending_bounds_tracks_widening_and_narrowing, andfind_passive_preserves_idle_timestamp_while_find_advances_it): 925 passed, 0 failed.cargo xtask policy --staged: passed on all modified files.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-11-30T01:01:36Z.
We ran a test of this PR on an 8-core Zen 3. Here it was slower, and one frame showed vegetation missing.
Setup:
41adb551(the merge only adds this PR's own commits), against41adb551itself;We also ran a picture check: a burst of 10 captures a second at the end of each run, looked at frame by frame.
41adb551If parts of this have switches, we can A/B them one at a time on this machine.
AI Assisted
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:51:38Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed