Skip writeback waits for unchanged page-mapping batches #4607
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!4607
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4606"
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?
@yumaste on GitHub · 2026-11-30 23:44 UTC · original
yumaste:nvidia/perf-noop-page-remaps→main· +1793 −986 · 42 files · 36 commits · closed without mergingWhat it changes
CopyPageMappingsBatchXwaits for overlapping GPU writeback before the mapper can see whether the batch actually changes any physical page. WithVICTORY_REMAP_SKIP_UNCHANGED=1, the single-threaded mapper checks the whole batch under the physical view lock before that wait. It can complete the batch when each alias still points to the same section and page index and each unmap covers an existing hole. A change to any page, contention on the view lock orVICTORY_REMAP_SYNC=1sends the batch through the existing wait and mapping path.VICTORY_REMAP_TIMING=1reports skipped batches and separates the check from the writeback wait in slow calls.How it was tested
Windows, RTX 5080 Laptop GPU, commit
e0945309. The A/B adds 256 copies of 64 MiB ahead of a GPU write to a synthetic title page. The queue benchmark uses a stand-in mapper and verifies the written byte after each flight lands. Separate XMem tests exercise the real page identity and hole checks. Each reported result is the median of 10 timed calls per case in an isolated process.Forcing
VICTORY_REMAP_SYNC=1restores the wait in the unchanged case (42.85 ms). The test isolates one potentially avoidable streaming stall. Gameplay and frame-time A/B are pending. The published trace in #3909 reports 0.0 remap waits per frame at its displayed precision, so the frequency of eligible stalls and the effect on frame times still need a route that reproduces them.cargo test --locked -p victory-gpu --lib -- --test-threads=1passed with 1,133 tests and 67 ignored.cargo test --locked -p victory-hle --lib modules::xmem::tests -- --test-threads=1passed with 48 tests and 1 ignored.remap_during_a_gpu_flight_ab --ignored --nocapture --test-threads=1in isolated GPU test processes withVICTORY_ADAPTER=RTX 5080,VICTORY_RELAY=2,VICTORY_LAND_BEFORE_REMAP=1and both values ofVICTORY_REMAP_SKIP_UNCHANGED. One run also forcedVICTORY_REMAP_SYNC=1.cargo clippy --locked -p victory-hle -p victory-gpu --all-targets -- -D warningspassed, also with--all-features.cargo run --locked --quiet -p xtask -- policy --stagedpassed.Checked for overlap
@trustno1-coder on GitHub · 2026-12-01 18:36 UTC · original
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