Repository navigation
Conversation
The write guards asked VirtualQuery whether a range is a view at each check, ~900 times per world frame; in the title's big heap each walks the page tables: 60 to 137 ms per frame (RX 6800), now 10 to 15 for whole checks. It is asked without holding the guards' lock, and an answer from before a remapping is not remembered. The runtime reported an unmapping before doing it: a check in between would have remembered a view that was going away, so it reports it after. A build that asked as well in the world found no wrong answer in 23,140. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it is remapped Head 6739366 (TG0000). Conflicts in watch.rs: guard() asks our allocation-type query (`mapped`, now `mapped_until`, which also gives the view region's end) once per block until a remap, outside the lock, and keeps #1025's announced blocks open. title_memory_remapped keeps our empty-range return, placed-texture eviction and bindless refresh, and counts remaps and forgets the remembered views. xmem.rs: every unmapping of a view, the undo of a failed mapping too, goes through unmap_title_view (reported after the unmapping). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re-copying them every submission Head 41af42e (wbkepler). Conflicts in watch.rs: Guards holds our announced blocks, #1277's view cache and #464's absent blocks; title_memory_remapped forgets all three for the range and keeps our placed-texture eviction. Tests: both sides'. #490 (one view query per block) is left out: #1277, merged before, does the same with the query outside the lock and the unmapping reported after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1215 #1135 #1296 #1277 #1238 #464 #1073 #1057 #1084 #416 #704 #621. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed at head 1. The caching is correct about invalidation. 2. The unmap path fixes a real ordering bug. 3. Full checks on 4. One residual race, noted not blocking: if a remap lands between Nothing found that would block this. |
|
Automated triage for the maintainers. Closing because this change is already in Caches the per-check view query of the old guard; main has no per-check query (trackers ask once when made) and remapping is reported by the runtime. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
Why
The write guards ask
VirtualQuerywhether a range is view memory at each check, about 900 times in a world frame. In the title's big heap each call walks the page tables.What
Measured
Time of a looped world frame's submissions (preparation, GPU, copy-back), all ways in one launch, RX 6800 on Windows; 8 frames, each repeated with every way. This is not frame time, and nothing here is an fps claim. One launch, one area, in a build of
mainwith measuring tools and other local changes, the same in every row.Medians of the paired differences with the range over the 8 frames; a control (same switches, another order) differed by 9 ms. A build that also asked each time found no wrong answer in 23,140 checks in the world.
Tests
remapped_memory_is_asked_about_again,a_check_during_the_unmapping_leaves_nothing_behind(fails when the report comes before the unmapping).cargo test --workspace --locked(344 passed), clippy with-D warningswith and without--all-featureson Windows, clippy on macOS: pass at 6739366.Overlap and conflicts
kernel_will_writeandwatch.rs, GPU: a write through one view of physical pages opens the guards of all its views #1122 the guards of all views of physical pages and the unmapping inxmem.rs: both conflict here. If either goes in first I rebase.Not verified
AI-assisted (Claude Code).
🤖 Generated with Claude Code