Repository navigation
gpu: keep the page guard lock when no mapping query is needed (opt-in) - #653
Blitzball996 wants to merge 1 commit into
Conversation
1fff28b to
50bef02
Compare
|
Tested #653 adapted onto our d4b5d51-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. |
Change
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.