land, inplace, watch: batch landing notes across jobs and add lock-free view bounds #3480
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!3480
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3480"
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?
@Maverick0351a on GitHub · 2026-11-29 23:47 UTC · original
Maverick0351a:perf/batch-landing-notes-and-view-bounds→main· +122 −24 · 4 files · 1 commits · merged 2026-11-30 14:12 UTCSummary
In open-world city gameplay (8,775 draws/frame, 63 landing jobs/frame across ~400 64 KiB pieces), landing per frame spent 27.19–46.75 ms of worker thread time in opening or noting guards (stat::NOTES):
1.
otes.flush() was called inside land::each(jobs.len(), &|j| ...) once per job (63 times/frame concurrently across worker threads), with each call acquiring VIEWS.read(), JOURNAL.write(), and REMAPPED.lock().
2. For the ~205 direct (non-view private heap) pieces per frame (eside.is_none()), piece_at called crate:⌚:landing(from, to - from) per piece across worker threads, which acquired VIEWS.read() (elsewhere) and REMAPPED.lock() (descriptor::host::remapped) 205 times per frame even when PROTECTED.any(...) was false.
3. inplace::beside and inplace::shown_elsewhere_in acquired VIEWS.read() even for addresses outside the mapped view range [VIEWS_MIN, VIEWS_MAX) or when pages_twice == 0, contending with streaming threads holding VIEWS.write().
Fix
Testing
@Kitrae on GitHub · 2026-11-30 00:05 UTC · original
I tested
499474efon an RTX 4090 at 3840×1080 with DLSS Performance and 2× frame generation. Both builds used the same local ultrawide and scene-entry changes on top of41adb551, and the process-memory scan was enabled throughout. I replayed the same post-prologue save twice per build, reversing the build order for the second comparison.The six one-second reporting intervals from 1–7 seconds after the first frame with at least 500 draws had a similar workload across runs, at roughly 16,000–16,500 draws per frame in the FPS log and a median of 62–63 landing jobs per frame.
The guard CPU savings repeated in both runs. In this scene-entry workload, the merge took about as long and the game rendered fewer frames with the patch. Later in the replay, draw counts diverged between runs, which makes the later FPS samples hard to compare. The frame counts above come from the frame-time log.
Both patched replays reached the world and ran for 36 seconds without a GPU failure. The targeted landing, mapped-memory, relay, and write-watch tests finished with 62 passed and one ignored.