Refresh registered buffer views through runtime guards #4554
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!4554
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4553"
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?
@vilaris on GitHub · 2026-11-30 22:19 UTC · original
vilaris:perf/registered-guard-refresh→main· +2695 −302 · 26 files · 7 commits · closed without mergingSummary
Use the runtime's existing guards to refresh shadow buffers backed by fully registered physical-memory views, including soft views that Windows still reports as reserved private memory. The path is opt-in with
VICTORY_REFRESH_REGISTERED_GUARDS=1.STORE_BESIDE. Reprotect opened blocks in batches of up to 64 and release the guard lock between batches.registered guardsseparately and include protection, publication and registry coverage in the first unknown-span sample.Gameplay A/B
RTX 4070, Series S profile, DLSS Quality at 1080p to 1440p, diagnostics build, the same copied save and roughly 29 seconds per arm. Both arms used
REFRESH_WHY=0,STORE_BESIDE=1,SOFT_VIEWS=copiesand frame generation off.The observed gain was 0.88 FPS (+5.8%). The benchmark's draw-count detector missed gameplay, so the sample was extracted from the frame-time logs. The driver continued sending Enter during both windows. This is one A/B pair on a diagnostics build.
Refresh diagnostics
The earlier 16-block build recorded a median 3.98% odd mapping generation, 364 remap spans and 677 MB of remap traffic per frame, plus 249 MB/frame under unknown pages. The final 64-block build recorded 1.29 ms of query time and 2.55 ms of total decision time at a median 1.04 GiB/frame across 29 comparable-volume reports with
WHY=1. The roughly 1 ms target remains open. The diagnostic timings are separate from the FPS comparison above.Validation and integration
STORE_BESIDE=1.mainlacks those commits and conflicts with the stack. The rebased result still needs to be built and remeasured.@IRennie74 on GitHub · 2026-11-30 22:39 UTC · original
Two things before this can be measured against main.
VICTORY_REFRESH_REGISTERED_GUARDS=1), but the stack also adds seventoggled!switches, so they are on unless set to0:VICTORY_GUARD_FIRST(watch.rs:1073),VICTORY_REFRESH_TRIM_EDGES(watch.rs:1713),VICTORY_DEFER_LIST_RECYCLE(host.rs:5554),VICTORY_SUBMIT_DIRTY_PAGES(host.rs:13010),VICTORY_WIDE_PAGE_SELECTION(host.rs:13036),VICTORY_BATCH_BUFFER_REFRESH(host.rs:13132) andVICTORY_REFRESH_PENDING_RANGES(shadow.rs:6280). The A/B toggles only the registered-guards switch, with all seven on in both arms. So nothing yet shows how the stack as a whole compares with main.docs/stuttering/and a.gitignoreline. Splitting it into the prerequisite PRs, each with its own A/B, would make it reviewable. It would also let others take the part that matters to them.The part I would most like to see on its own is the guard batching: reprotecting in batches of 64 and releasing the guards' lock between batches, and keeping clean blocks protected. On a Ryzen 5 5600X + RTX 3060 (Series S, DLSS Performance), the write guards cost about 330 faults a frame (22 ms) on the title's threads, 10-13 ms waiting for the guards' lock, and about 19 ms of protection changes. In our runs, resting hot blocks unguarded (
VICTORY_GUARD_HOT) only moved that cost onto the submitting thread. Fewer re-arms is what would help there, which is what this aims at. I can run a split-out version of that piece on that PC.The measured arm also used
VICTORY_STORE_BESIDE=1, which #4492 proposes turning on by default. If both land, the defaults this was measured under change with it.Pull request closed