gpu: keep the page guard lock when no mapping query is needed (opt-in) #653
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!653
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-653"
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?
@Blitzball996 on GitHub · 2026-11-28 02:46 UTC · original
Blitzball996:perf/keep-guard-lock→main· +24 −23 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCChange
guard()checks the bitmap of absent blocks while holdingGUARDS. When there are no uncertain blocks, it releases and immediately reacquires the mutex before examining dirty blocks.VICTORY_KEEP_GUARD_LOCK=1keeps the existing guard across that empty interval. Ranges that need a Windows mapping query still release the mutex for the query and revalidate the result after reacquiring it. The switch is opt-in and supportsVICTORY_ABin diagnostics builds.In a 24-second diagnostics capture, 286 of 2,312 samples of the submitting thread were waiting for
watch::guardsfromwritesduring a buffer refresh. This is a count of sampled stacks across the guard path. It does not isolate time spent on the second acquisition.Measurements
RTX 4070 SUPER, i7-14700KF, Series S profile, DLSS Performance (960x540 to 1920x1080), frame generation disabled. The two release runs used the same save and launcher settings on a local branch containing upstream
a4d05e7. The table uses median base FPS from five-second reporting windows with zero pipelines being compiled, 55 to 155 seconds after entering the world.In a separate diagnostics run,
VICTORY_AB=6,VICTORY_KEEP_GUARD_LOCKalternated the switch every six seconds. Of seven adjacent off/on pairs within 5% in draw count, six had lower mean frame time with the switch. The median paired difference was -1.5 ms. Independent runs can differ in streaming and scene timing. The full release run showed no overall FPS gain.Verification
cargo test --offline --locked -p victory-gpu watch::tests:: -- --test-threads=1passed all 35 tests on the PR branch with the switch set to0and again with it set to1.Related work in #516 changes fault handling and the collection of soft-view ranges in the same guard path.
The branch targets
mainat8fc2254. PR #687 addresses the upstream CI failures independently.1fff28b400to50bef02a1f@NotADonky43 on GitHub · 2026-11-28 23:44 UTC · original
Tested #653 adapted onto our d4b5d517-based cumulative, retaining the newer soft-view lookup under GUARDS after reacquisition. Same optimized executable off/on, 37 watch tests passed per side (including alias and late-fault cases). Windows RTX 5070 Ti, Series X, 1440p DLSS Quality, no FG, identical precompiled shaders/native pipeline library and starting state. Both reached settled heavy rendering and closed at milestone.
One opening pair: across 7 off vs 6 on heavy reports with no pipelines compiling, median reported preparation was 47.6 vs 39.7 ms/frame, but the median of their present-interval p95s was 68.5 vs 67.4 ms, and p99s 77.0 vs 77.4 ms. Not scene-matched (median draws/frame 3401 vs 3230; copied 45.3 vs 50.1 MB/frame). No proven tail or FPS improvement; retaining as a separate opt-in experiment. These timings do not directly measure GUARDS lock duration.