victory-gpu: eliminate 60 ms let_go_idle sweep stutter, lock-free watch/pending hot paths & recording contention fixes #3502
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!3502
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Rulemore on GitHub · 2026-11-30 00:08 UTC · original
Rulemore:pr/gpu-cpu-stutter→main· +1292 −336 · 17 files · 11 commits · closed without mergingSummary
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.@DoubleD17 on GitHub · 2026-11-30 01:01 UTC · original
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
github-bot referenced this pull request2026-11-30 01:14:29 +00:00
github-bot referenced this pull request2026-11-30 09:34:54 +00:00
Pull request closed