fix(gpu): raise fault-page bound to 16,384, skip <4 GiB strays, and log refused pages #1008

Closed
github-bot wants to merge 1 commit from github-bot/gh-1008 into main AGit
Owner

@⁠whoalin1 on GitHub · 2026-11-28 10:59 UTC · original
whoalin1:pr/bvh-fault-strays-confirm → main · +102 −8 · 1 files · 1 commits · closed without merging

Summary

Updates title-memory fault-page handling in crates/victory-gpu/src/memory.rs for ray-tracing / BVH workloads:

  • Raises FAULTS_ALL from 2,048 to 16,384 and adds VICTORY_BVH_FAULTS_ALL=<n> (the 2,048 cap could exhaust ~50 s into a scene, leaving later committed reads zeroed).
  • Filters out < 4 GiB (page < 0x1_0000) and out-of-range (>= MEMORY_PAGES - 1) stray walker faults before tracking or counting.
  • Adds opt-in VICTORY_BVH_FAULTS_CONFIRM=<frames> (unset/0 preserves immediate first-ask mapping; N > 0 waits for a second ask within N frames to filter single-frame stray bursts).
  • Logs diagnostic details for the first frames that leave pages unmapped at the bound (?: uncommitted, b: in title buffer, p: packed structure), plus per-interval distinct, left, and waiting stats.

Verification

Verified on Windows (x86_64-pc-windows-msvc, RTX 4070 SUPER):

  • git diff --check origin/main..HEAD — clean
  • cargo run --locked -p xtask -- policy — asset policy: 294 files ok
  • cargo clippy --workspace --all-targets --locked & --all-features — 0 warnings in crates/victory-gpu/src/memory.rs
  • cargo test --release -p victory-gpu --locked --lib memory:: -- --test-threads=1 — 2 passed, 0 failed, 0 ignored
**@⁠whoalin1** on GitHub · 2026-11-28 10:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1008) `whoalin1:pr/bvh-fault-strays-confirm` → `main` · +102 −8 · 1 files · 1 commits · closed without merging ## Summary Updates title-memory fault-page handling in [`crates/victory-gpu/src/memory.rs`](crates/victory-gpu/src/memory.rs) for ray-tracing / BVH workloads: - Raises `FAULTS_ALL` from `2,048` to `16,384` and adds `VICTORY_BVH_FAULTS_ALL=<n>` (the `2,048` cap could exhaust ~50 s into a scene, leaving later committed reads zeroed). - Filters out `< 4 GiB` (`page < 0x1_0000`) and out-of-range (`>= MEMORY_PAGES - 1`) stray walker faults before tracking or counting. - Adds opt-in `VICTORY_BVH_FAULTS_CONFIRM=<frames>` (unset/`0` preserves immediate first-ask mapping; `N > 0` waits for a second ask within `N` frames to filter single-frame stray bursts). - Logs diagnostic details for the first frames that leave pages unmapped at the bound (`?: uncommitted`, `b: in title buffer`, `p: packed structure`), plus per-interval `distinct`, `left`, and `waiting` stats. ## Verification Verified on Windows (`x86_64-pc-windows-msvc`, RTX 4070 SUPER): - `git diff --check origin/main..HEAD` — clean - `cargo run --locked -p xtask -- policy` — `asset policy: 294 files ok` - `cargo clippy --workspace --all-targets --locked` & `--all-features` — 0 warnings in `crates/victory-gpu/src/memory.rs` - `cargo test --release -p victory-gpu --locked --lib memory:: -- --test-threads=1` — 2 passed, 0 failed, 0 ignored
- Add `VICTORY_BVH_FAULTS_ALL` (default `16_384`, up from hardcoded `2048` which could exhaust ~50s into a scene).
- Skip stray `< 4 GiB` page faults (`page < 0x1_0000`) before waiting/counting so bogus low-address walker faults do not churn fault tracking.
- Add optional `VICTORY_BVH_FAULTS_CONFIRM=<frames>` (unset/0 keeps immediate first-ask mapping; N requires a second ask within N frames).
- Log diagnostics for pages left unmapped after hitting the bound (`?` uncommitted, `b` in title buffer).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:31:43 +00:00
github-bot closed this pull request 2026-11-28 20:28:49 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-28 20:23 UTC · original

Thanks for this. I'm closing it without merging because #722 covers the same problem (#688: the faulted-page budget ran out and never came back) and is going into main: faulted pages are kept under a reusable budget (VICTORY_RT_FAULT_MB, VICTORY_RT_FAULT_KEEP). The two conflict throughout memory.rs. If yours does something #722 doesn't, please rebase it on main once #722 is in and open a new pull request.

**@⁠trustno1-coder** on GitHub · 2026-11-28 20:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1008#issuecomment-7245249107) Thanks for this. I'm closing it without merging because #722 covers the same problem (#688: the faulted-page budget ran out and never came back) and is going into main: faulted pages are kept under a reusable budget (`VICTORY_RT_FAULT_MB`, `VICTORY_RT_FAULT_KEEP`). The two conflict throughout memory.rs. If yours does something #722 doesn't, please rebase it on main once #722 is in and open a new pull request.

Pull request closed

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!1008
No description provided.