Skip to content

memory: recycle a 512 MB budget of ray-tracing fault pages - #401

Closed
Kikoarl wants to merge 1 commit into
trustno1-coder:mainfrom
Kikoarl:feat/rt-recycled-page-budget
Closed

Kikoarl wants to merge 1 commit into
trustno1-coder:mainfrom
Kikoarl:feat/rt-recycled-page-budget

Conversation

@Kikoarl

@Kikoarl Kikoarl commented Nov 27, 2026

Copy link
Copy Markdown

Summary

Ports the 512 MB recycled ray-tracing fault-page budget and fault-miss breakdown from fxceless/victory-fork commit 3e573d2556adc5a5b22ccd2d6d92231a72ee55bb (GPL-3.0-or-later), rebased onto main (df2daaf).

Changes

Distinct from PR #181 (shadow::exact() buffer pooling) and PR #295 (placed-page write-watch stamps).

Verification

Verified on Windows (x86_64-pc-windows-msvc) against main (df2daaf):

  • git diff --check main..HEAD — clean
  • cargo test -p xtask --locked — 6 passed, 0 failed (asset policy: 287 files ok)
  • cargo clippy -p victory-gpu --all-targets --locked — exit 0, 0 warnings in changed files (main has pre-existing clippy warnings in untouched files)
  • cargo test -p victory-gpu --locked memory:: — 5 passed, 0 failed

Port the recycled ray-tracing fault-page budget from fxceless/victory-fork commit 3e573d2556adc5a5b22ccd2d6d92231a72ee55bb (including the fault-miss breakdown from 52dfd12 carried in 3e573d2) into crates/victory-gpu/src/memory.rs while preserving PR trustno1-coder#88 (30b979e) in Memory::another.
SplenectomY pushed a commit to SplenectomY/VIctory-NVIDIA that referenced this pull request Nov 28, 2026
…art of fxceless 2eade68c)

The pool gate port left this hunk out while this branch had no pages held
from faults. With the fault-page budget of PR trustno1-coder#401 merged, card_room() takes
the same rule as shadow::by_address: crate::resource::by_address_room.

(cherry picked from commit 2eade68c of fxceless/victory-fork, memory.rs only)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQcgHR3YtRXoG9ujeWvCLK
@Mumogg

Mumogg commented Nov 28, 2026

Copy link
Copy Markdown

Data point from Linux (Wine + GE vkd3d-proton, RTX 5070 Ti 16 GB, Series X profile, title ray tracing on with VICTORY_BVH_BUILDER=1). Two 8-minute runs on the same save, without and with fxceless 3e573d25 (the same change as this PR):

  • Without: "faults in all" reached the run-wide cap of 2048 about 35 s after ray tracing started and stayed there for the rest of the run. Every fault warning after that point said made=0, with about 150-330 pages a frame left without a copy. Cars turned lime green about when the cap was reached.
  • With: "faults in all" kept climbing (15,700 by the end of the run), and pages kept being made late in the run, so the cap no longer runs out.

On frame rate: ray tracing stays expensive on this card (9-12 fps at 4K output), but that cost is separate from this change. The builder dispatches (150-1500 a frame) account for most of it. (AI-assisted test and write-up.)

@trustno1-coder

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants