Watch: descriptor heap blocks open by 4 KiB part on a write fault, guard tells the parts (VICTORY_GUARD_PARTS) #1853

Open
github-bot wants to merge 2 commits from github-bot/gh-1853 into main AGit
Owner

@⁠101Leafy on GitHub · 2026-11-29 00:46 UTC · original
101Leafy:nv/guard-parts → main · +217 −6 · 2 files · 2 commits · open

Adds VICTORY_GUARD_PARTS, 0 by default, so nothing changes unless it is set. With a value from 1 to 16, a write fault in a guarded block of the descriptor heaps opens only the 4 KiB part it hit, and the guard tells only the open parts as written, so the heap copy reads and compares those parts and not the whole block. Once that many parts of a block are open, the next fault opens the block whole as before. A block with other views also opens whole, because a write through another view would not fault at this one's parts.

On our side the switch was on at 4 parts. It is off here. With all of each opened block told as written, the heap copy looked at 399,360 descriptor slots a frame for about 57,000 changed, read 18.4 MB, and spent 9.7 ms reading and comparing and 17 ms asking. The title writes a few descriptors at a time.

The parts path stays off under VICTORY_FAULT_UNLOCKED, whose faults open whole blocks without the guards' lock and have no notes of parts. Diagnostics builds get five counters for part faults, whole opens, blocks with other views, and the blocks and parts closed again, and the counter array grows to 96. The test that opens a heap block by the part runs with 4 parts.

**@⁠101Leafy** on GitHub · 2026-11-29 00:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1853) `101Leafy:nv/guard-parts` → `main` · +217 −6 · 2 files · 2 commits · open Adds VICTORY_GUARD_PARTS, 0 by default, so nothing changes unless it is set. With a value from 1 to 16, a write fault in a guarded block of the descriptor heaps opens only the 4 KiB part it hit, and the guard tells only the open parts as written, so the heap copy reads and compares those parts and not the whole block. Once that many parts of a block are open, the next fault opens the block whole as before. A block with other views also opens whole, because a write through another view would not fault at this one's parts. On our side the switch was on at 4 parts. It is off here. With all of each opened block told as written, the heap copy looked at 399,360 descriptor slots a frame for about 57,000 changed, read 18.4 MB, and spent 9.7 ms reading and comparing and 17 ms asking. The title writes a few descriptors at a time. The parts path stays off under VICTORY_FAULT_UNLOCKED, whose faults open whole blocks without the guards' lock and have no notes of parts. Diagnostics builds get five counters for part faults, whole opens, blocks with other views, and the blocks and parts closed again, and the counter array grows to 96. The test that opens a heap block by the part runs with 4 parts.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 00:50:49 +00:00
github-bot force-pushed github-bot/gh-1853 from 151defc9b7 to 8e6a702928 2026-11-29 01:55:11 +00:00 Compare
github-bot force-pushed github-bot/gh-1853 from 8e6a702928 to 2e0968fea4 2026-11-29 07:27:09 +00:00 Compare
Author
Owner

@⁠eleboucher on GitHub · 2026-11-29 07:36 UTC · original

PC result: RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11, native 1440p, VICTORY_BVH_BUILDER=1 VICTORY_ACTIVATE_RAYS=1, diagnostics build of main 568c5e5d plus this PR and several others (one exe, one switch per run), 10-minute runs, medians after 200 s. Same exe without the switch: 24.3 fps (p10 23.5), preparing 30.6 ms.

With VICTORY_GUARD_PARTS=4: 25.2 fps (p10 23.9), preparing 29.8 ms. About +0.9 fps, near run-to-run noise here (~0.5 fps). No crash or picture problem seen.

**@⁠eleboucher** on GitHub · 2026-11-29 07:36 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1853#issuecomment-7252573307) PC result: RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11, native 1440p, `VICTORY_BVH_BUILDER=1 VICTORY_ACTIVATE_RAYS=1`, diagnostics build of main 568c5e5d plus this PR and several others (one exe, one switch per run), 10-minute runs, medians after 200 s. Same exe without the switch: 24.3 fps (p10 23.5), preparing 30.6 ms. With `VICTORY_GUARD_PARTS=4`: 25.2 fps (p10 23.9), preparing 29.8 ms. About +0.9 fps, near run-to-run noise here (~0.5 fps). No crash or picture problem seen.
github-bot force-pushed github-bot/gh-1853 from 2e0968fea4 to 83bf00298e 2026-11-29 09:23:13 +00:00 Compare
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/copystat.rs
  • crates/victory-gpu/src/watch.rs
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.
git fetch -u origin '+refs/pull/1853/head:github-bot/gh-1853'
git switch 'github-bot/gh-1853'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1853'
git switch 'github-bot/gh-1853'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1853'
git switch 'github-bot/gh-1853'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1853'
git switch 'main'
git merge --squash 'github-bot/gh-1853'
git switch 'main'
git merge --ff-only 'github-bot/gh-1853'
git switch 'main'
git merge 'github-bot/gh-1853'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1853
No description provided.