gpu: keep faulted pages under a budget #722
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/722"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tharun-37 on 2026-11-28T04:28:52Z.
Fixes #688.
Faulted pages were counted once and never released, so after the 2048-page budget was spent later missing pages read zeros for the rest of the run. This keeps faulted arena pages under \VICTORY_RT_FAULT_MB\ (1024 MiB by default), refreshes pages that fault again through the existing write-watch path, and gives back the oldest pages that no packed structure owns and no shader has looked at lately. Pages taken or looked at in the last few frames are kept, so the builder still has them. \VICTORY_RT_FAULT_KEEP=0\ keeps the old once-only budget for comparison.
Adds tests for the budget parsing, the switch, and the retired-page order. Documents both switches.
Validation: \cargo test -p victory-gpu --locked; \cargo check --workspace --locked; \cargo xtask policy.
AI-assisted (OpenCode).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T05:16:24Z.
Review: APPROVED
LGTM — verified on Windows:
cargo test -p victory-gpu --lib memory::passed (4/4, includingfault_budget_and_switch_have_sane_defaultsandthe_oldest_idle_fault_pages_go_back_first)cargo xtask policypassed (294 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jptorres96 on 2026-11-28T09:17:01Z.
save_sharetests: 5/5 passed, three consecutive runs. One earlier run hit OS error 32 (file in use) inthe_game_settings_are_never_shared_and_the_players_own_are_kept. I couldn't reproduce it, and it looks like another process was holding the file, but it might be worth making the test use a unique temp dir.Env: RTX 4080 SUPER (driver 621.01), Ryzen 5 5600X, Windows build 26300, rustc 1.98.1, DXC 1.9.2609.5 (
VICTORY_DXIL),--test-threads=1.VICTORY_INDIRECT_REST=1set to sidestep main's two indirect budget-test failures (fixed in #67), unrelated to this PR.