GPU: store watch protected/clean guards as coalesced BlockRuns intervals #1067
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1067
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1067"
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?
@UwUCammie on GitHub · 2026-11-25 18:18 UTC · original
UwUCammie:pr/watch-block-runs→main· +295 −76 · 1 files · 1 commits · openGuards.protectedandGuards.cleaninwatch.rswereBTreeSet<usize>holding one entry per 64 KiB block. Eachwatch::guard()call allocated aVec<usize>overg.clean.range(first..last)(up to ~150k blocks/frame across ~10 GB of view memory), lockedGUARDStwice, and walked every block infirst..=lastwhenever any block in a range was dirty.protectedandcleanwithBlockRuns(BTreeMap<usize, usize>storing maximal disjoint[start, end)block intervals).g.clean.covers(first, last)fast path inguard()with zero allocation when a range is clean, and walks onlyg.clean.missing_runs(first, last)gaps when blocks are dirty (withinstall()hoisted above the lock to avoid VEH lock-order inversion).open_here()usestake_runs()to remove andVirtualProtectcontiguous runs directly (falling back per-block if a run spans regions).block_runs_intervals_merge_split_and_query.Tested on Linux + Wine 11.22 + RX 7900 XT (RADV,
VICTORY_RELAY=2, 480 s run into the cell scene):watchesdropped from ~21.2 ms to ~16.8 ms/frame (guards17.3 -> 13.4 ms/frame), 0 GPUVM faults, picture unchangedwatch::testspass under Wine.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.