Opt in to sparse backing for large title physical pools on Windows #2461

Open
github-bot wants to merge 3 commits from github-bot/gh-2461 into main AGit
Owner

@⁠dsh38 on GitHub · 2026-11-29 13:16 UTC · original
dsh38:native-large-physical-pools → main · +26 −9 · 3 files · 3 commits · open

What it changes

On native Windows, VICTORY_FILE_BACKED_PAGES=large lets title physical pools of at least 256 MiB use temporary sparse files in the configured physical-pages directory. Smaller pools keep their native GPU import eligibility. This uses the checked cache path, section lifetime and delete-on-close handling from #1226. Mapping a writable file view marks its slices as used so the low-heap arranger cannot move a slice whose contents have already been exposed. The existing Wine opt-in and the default native backing selection keep their prior behaviour.

How it was tested

  • Windows 11 Pro 26200, RTX 4080 SUPER 16 GB, driver 617.14, Ryzen 9 7950X3D, 64 GB RAM, fixed 4 GiB pagefile. Release based on 829188e9. Series X, 2560×1440 internal output, DLSS Performance, ray-tracing structure builder on, Ada 4× requested, 1920×1080 window. Restored the same save and pipeline cache for each run.
  • Kept VICTORY_DYNAMIC_SLOTS=393216 in both runs. The renderer reported a 1,000,000-entry host view heap. Measured Windows system commit above each run’s idle baseline 6–9 seconds after the first presented frame.
  • Before: +18.16 GiB, 11.08 GiB process private bytes. Our external harness closed the window at 5,440 MiB free commit (46 s including shutdown).
  • After, with only the large-pool opt-in: +11.38 GiB, 10.69 GiB process private bytes. Two files backed pools of 710 and 6,236 MiB. The house exterior and interior rendered. The same guard was eventually reached at 5,400 MiB (163 s). The 6.78 GiB reduction is in system commit at load. Renderer allocations can still grow later in play.
  • cargo build --locked --release -p victory passed. All 24 core library tests passed. All 46 active XMem tests passed serially, including the new writable-alias assertion and the existing file lifetime and DirectStorage tests. The full parallel HLE library run had two failures: the narrow command-line code-page test (also fails on stock on this PC) and a range-remapping timing test (passes serially). The staged asset-policy check passed.

Checked for overlap

  • Searched open PRs for pagefile, file-backed physical pages, XMem and the touched files. #1226 introduced Wine file backing. #2455 changes Wine mappings and renderer imports. #2133, #2263 and #2390 touch other XMem paths. #2313 chooses where GPU upload windows live. #2392 changes compiler admission accounting.
**@⁠dsh38** on GitHub · 2026-11-29 13:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2461) `dsh38:native-large-physical-pools` → `main` · +26 −9 · 3 files · 3 commits · open ## What it changes On native Windows, `VICTORY_FILE_BACKED_PAGES=large` lets title physical pools of at least 256 MiB use temporary sparse files in the configured physical-pages directory. Smaller pools keep their native GPU import eligibility. This uses the checked cache path, section lifetime and delete-on-close handling from #1226. Mapping a writable file view marks its slices as used so the low-heap arranger cannot move a slice whose contents have already been exposed. The existing Wine opt-in and the default native backing selection keep their prior behaviour. ## How it was tested - Windows 11 Pro 26200, RTX 4080 SUPER 16 GB, driver 617.14, Ryzen 9 7950X3D, 64 GB RAM, fixed 4 GiB pagefile. Release based on `829188e9`. Series X, 2560×1440 internal output, DLSS Performance, ray-tracing structure builder on, Ada 4× requested, 1920×1080 window. Restored the same save and pipeline cache for each run. - Kept `VICTORY_DYNAMIC_SLOTS=393216` in both runs. The renderer reported a 1,000,000-entry host view heap. Measured Windows system commit above each run’s idle baseline 6–9 seconds after the first presented frame. - Before: +18.16 GiB, 11.08 GiB process private bytes. Our external harness closed the window at 5,440 MiB free commit (46 s including shutdown). - After, with only the large-pool opt-in: +11.38 GiB, 10.69 GiB process private bytes. Two files backed pools of 710 and 6,236 MiB. The house exterior and interior rendered. The same guard was eventually reached at 5,400 MiB (163 s). The 6.78 GiB reduction is in system commit at load. Renderer allocations can still grow later in play. - `cargo build --locked --release -p victory` passed. All 24 core library tests passed. All 46 active XMem tests passed serially, including the new writable-alias assertion and the existing file lifetime and DirectStorage tests. The full parallel HLE library run had two failures: the narrow command-line code-page test (also fails on stock on this PC) and a range-remapping timing test (passes serially). The staged asset-policy check passed. ## Checked for overlap - [x] Searched open PRs for pagefile, file-backed physical pages, XMem and the touched files. #1226 introduced Wine file backing. #2455 changes Wine mappings and renderer imports. #2133, #2263 and #2390 touch other XMem paths. #2313 chooses where GPU upload windows live. #2392 changes compiler admission accounting.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 13:17:26 +00:00
Author
Owner

@⁠dsh38 on GitHub · 2026-11-29 13:21 UTC · original

Follow-up on sustained play with the same RT-on Series X save, camera sequence and 393,216 slots. The stock host plus VICTORY_WINDOWS_BAR_MB=4096 alone hit the 5,500 MiB external commit guard after 58 s. On this branch, VICTORY_FILE_BACKED_PAGES=large, VICTORY_WINDOWS_BAR_MB=4096 and VICTORY_POOL_SMALL=1 completed the scheduled 420 s observation with 7,197 MiB minimum free system commit and a normal window close. System commit peaked at 60.15 GiB. During seconds 180–410 the game reported 3,200 source presents and 12,800 frames shown, with 14.0 median source FPS. The 4 KiB texture option was not tested independently here.

CI on this PR and on its unchanged base both stop at the same unused victory_loader::crash::unwind_copy in crash.rs:804. Base check · PR check.

**@⁠dsh38** on GitHub · 2026-11-29 13:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2461#issuecomment-7256481881) Follow-up on sustained play with the same RT-on Series X save, camera sequence and 393,216 slots. The stock host plus `VICTORY_WINDOWS_BAR_MB=4096` alone hit the 5,500 MiB external commit guard after 58 s. On this branch, `VICTORY_FILE_BACKED_PAGES=large`, `VICTORY_WINDOWS_BAR_MB=4096` and `VICTORY_POOL_SMALL=1` completed the scheduled 420 s observation with 7,197 MiB minimum free system commit and a normal window close. System commit peaked at 60.15 GiB. During seconds 180–410 the game reported 3,200 source presents and 12,800 frames shown, with 14.0 median source FPS. The 4 KiB texture option was not tested independently here. CI on this PR and on its unchanged base both stop at the same unused `victory_loader::crash::unwind_copy` in `crash.rs:804`. [Base check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46242667281/job/141282766344) · [PR check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46266580609/job/141357786216).
This pull request has changes conflicting with the target branch.
  • crates/victory-hle/src/modules/xmem.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/2461/head:github-bot/gh-2461'
git switch 'github-bot/gh-2461'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2461'
git switch 'github-bot/gh-2461'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2461'
git switch 'github-bot/gh-2461'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2461'
git switch 'main'
git merge --squash 'github-bot/gh-2461'
git switch 'main'
git merge --ff-only 'github-bot/gh-2461'
git switch 'main'
git merge 'github-bot/gh-2461'
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!2461
No description provided.