land, inplace, watch: batch landing notes across jobs and add lock-free view bounds #3480
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Maverick0351a on 2026-11-29T23:47:05Z.
Summary
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
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Kitrae on 2026-11-30T00:05:08Z.
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.