residency: read a single-string PagingFiles value (system-managed pagefile growth counted) #4066

Open
jebaczydow wants to merge 1 commit from upstream-pr/4066 into main
jebaczydow commented 2026-11-30 15:26:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jebaczydow on 2026-11-30T15:26:01Z.


What it changes

pagefiles() in crates/victory-gpu/src/residency.rs asks the registry for PagingFiles as REG_MULTI_SZ only. On a system-managed pagefile, Windows can store that value as a single REG_SZ (?:\pagefile.sys). Then the read fails, the pagefile list is empty and commit_growth() is 0, so available_commit() equals the raw ullAvailPageFile again. available_commit() is what the memory guard has used since #2392.

The change adds RRF_RT_REG_SZ to the type filter of the two RegGetValueW calls (size query and read). The parsing after the read is unchanged: it already splits on \0.

How it was tested

  • Checked on my PC (Windows 11 10.0.26300): PagingFiles under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management is a REG_SZ with the value ?:\pagefile.sys.
  • cargo build --release --locked -p victory builds on c71899d9.
  • GPU and profile: RTX 5070 Ti, Series X, DLSS balanced, frame generation 2x, 1080to1440. I have not run the game with this change on c71899d9 and have not measured a before/after there.
  • cargo test for the crate: not run. The victory-gpu lib test target does not compile on c71899d9 (with and without this change): host.rs:20302 and host.rs:20328 call a function that takes 6 arguments with 5.
  • For shader changes: not a shader change.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. None changes how pagefiles() reads the registry. Related: #339 and #2392 (merged), #2717, #3379.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5568239350 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4066). Originally posted by [jebaczydow](https://github.com/jebaczydow) on 2026-11-30T15:26:01Z. --- ## What it changes `pagefiles()` in `crates/victory-gpu/src/residency.rs` asks the registry for `PagingFiles` as `REG_MULTI_SZ` only. On a system-managed pagefile, Windows can store that value as a single `REG_SZ` (`?:\pagefile.sys`). Then the read fails, the pagefile list is empty and `commit_growth()` is 0, so `available_commit()` equals the raw `ullAvailPageFile` again. `available_commit()` is what the memory guard has used since #2392. The change adds `RRF_RT_REG_SZ` to the type filter of the two `RegGetValueW` calls (size query and read). The parsing after the read is unchanged: it already splits on `\0`. ## How it was tested - Checked on my PC (Windows 11 10.0.26300): `PagingFiles` under `HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management` is a `REG_SZ` with the value `?:\pagefile.sys`. - `cargo build --release --locked -p victory` builds on `c71899d9`. - GPU and profile: RTX 5070 Ti, Series X, DLSS balanced, frame generation 2x, 1080to1440. **I have not run the game with this change on `c71899d9`** and have not measured a before/after there. - `cargo test` for the crate: **not run.** The `victory-gpu` lib test target does not compile on `c71899d9` (with and without this change): `host.rs:20302` and `host.rs:20328` call a function that takes 6 arguments with 5. - For shader changes: not a shader change. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. None changes how `pagefiles()` reads the registry. Related: #339 and #2392 (merged), #2717, #3379. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jebaczydow commented 2026-11-30 19:47:33 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jebaczydow on 2026-11-30T19:47:33Z.


Still the case on v2026.11.30.03 (this PR is not in it).

On this PC the PagingFiles registry value is a single REG_SZ (?:\pagefile.sys, system managed), not REG_MULTI_SZ. Two play logs from v2026.11.30.03 (Windows 11 10.0.26300, RTX 5070 Ti, 32 GB RAM) both show:

  • residency: pagefiles: commit can grow beyond the limit of the moment ... pagefiles=[] commit_limit_mib=43124
  • memguard: a compile is put off ... reason="the commit left would fall under its floor": 11 times in one run, 10 in the other, each with about 3.9 GB of free commit.

The change here applies cleanly on top of v2026.11.30.03 (residency.rs is the same as in v2026.11.30.01) and builds. I have not yet played with it on v2026.11.30.03, so I do not claim what it changes in the game.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7289944462 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4066#issuecomment-7289944462). Originally posted by [jebaczydow](https://github.com/jebaczydow) on 2026-11-30T19:47:33Z. --- Still the case on v2026.11.30.03 (this PR is not in it). On this PC the `PagingFiles` registry value is a single `REG_SZ` (`?:\pagefile.sys`, system managed), not `REG_MULTI_SZ`. Two play logs from v2026.11.30.03 (Windows 11 10.0.26300, RTX 5070 Ti, 32 GB RAM) both show: - `residency: pagefiles: commit can grow beyond the limit of the moment ... pagefiles=[] commit_limit_mib=43124` - `memguard: a compile is put off ... reason="the commit left would fall under its floor"`: 11 times in one run, 10 in the other, each with about 3.9 GB of free commit. The change here applies cleanly on top of v2026.11.30.03 (`residency.rs` is the same as in v2026.11.30.01) and builds. I have not yet played with it on v2026.11.30.03, so I do not claim what it changes in the game.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4066:upstream-pr/4066'
git switch 'upstream-pr/4066'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/4066'
git switch 'upstream-pr/4066'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4066'
git switch 'upstream-pr/4066'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4066'
git switch 'main'
git merge --squash 'upstream-pr/4066'
git switch 'main'
git merge --ff-only 'upstream-pr/4066'
git switch 'main'
git merge 'upstream-pr/4066'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

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