memguard: count pagefile growth as commit left, as residency does #2392

Merged
Brillanc3 merged 1 commit from upstream-pr/2392 into main 2026-11-30 14:12:03 +00:00
Brillanc3 commented 2026-11-29 12:37:26 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Brillanc3 on 2026-11-29T12:37:26Z.


Fixes #2385

What it changes

The memory guard (memguard.rs, 60a08ef) read the commit left from ullAvailPageFile, the commit limit of the moment. With a system-managed pagefile that limit sits only a few GB above the commit while the world loads, so the guard stayed at its 4096 MB floor and put off about 1,330 compiles per run: their draws were dropped and the game ran at 0.1-0.2 fps (details and logs in #2385).

memguard::figures_now() now takes residency::available_commit(), the limit of the moment plus what the pagefiles may still grow by (held to the free space of their volume less 8 GB; VICTORY_COMMIT_GROWTH=0 keeps the limit alone). The residency pass and the memory guard now count commit the same way (#339). available_commit becomes pub(crate); nothing else changes (floors, defaults, VICTORY_COMMIT_FLOOR_MB, VICTORY_COMPILE_MEMORY).

The guard still protects against the ptxas fatal: Memory allocation failure case it was written for: on a PC whose pagefiles cannot grow (fixed size, or a full volume) the figure is the same as before.

How it was tested

  • GPU and profile: RTX 5080 16 GB (driver 617.42), 32 GB RAM, Windows 11 26200, system-managed pagefile; Series X, 3440x1440 output (with #2060), DLSS Quality, frame generation auto, no ray tracing.
  • Before: 1,325-1,354 0x8007000e refusals from the guard per run, free_commit_mb=3929, 0.1-0.2 fps from the world load on (three runs, 1440p and 4K).
  • After (default floors): free_commit_mb=80761; no commit refusal, 6 compiles put off by the physical-memory soft floor only, 30 0x8007000e; 5-18 fps in the world over 3 minutes. Still below the menus' 144 fps on this PC (free physical memory ~1.6 GB at ~29 GB committed), which this PR does not claim to fix.
  • cargo test --locked -p victory-gpu --lib -- memguard compilemem pipeline::make: 46 passed.
  • cargo clippy -p victory-gpu --all-targets --no-deps -- -D warnings reports the same 28 + 25 errors on main without this change, none in the two files touched.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #1173 (also touches residency.rs, pipeline worker throttling, not the guard's figures), #339 (merged, the same correction for the residency pass).

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5550773172 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392). Originally posted by [Brillanc3](https://github.com/Brillanc3) on 2026-11-29T12:37:26Z. --- Fixes #2385 ## What it changes The memory guard (`memguard.rs`, 60a08ef) read the commit left from `ullAvailPageFile`, the commit limit of the moment. With a system-managed pagefile that limit sits only a few GB above the commit while the world loads, so the guard stayed at its 4096 MB floor and put off about 1,330 compiles per run: their draws were dropped and the game ran at 0.1-0.2 fps (details and logs in #2385). `memguard::figures_now()` now takes `residency::available_commit()`, the limit of the moment plus what the pagefiles may still grow by (held to the free space of their volume less 8 GB; `VICTORY_COMMIT_GROWTH=0` keeps the limit alone). The residency pass and the memory guard now count commit the same way (#339). `available_commit` becomes `pub(crate)`; nothing else changes (floors, defaults, `VICTORY_COMMIT_FLOOR_MB`, `VICTORY_COMPILE_MEMORY`). The guard still protects against the `ptxas fatal: Memory allocation failure` case it was written for: on a PC whose pagefiles cannot grow (fixed size, or a full volume) the figure is the same as before. ## How it was tested - GPU and profile: RTX 5080 16 GB (driver 617.42), 32 GB RAM, Windows 11 26200, system-managed pagefile; Series X, 3440x1440 output (with #2060), DLSS Quality, frame generation auto, no ray tracing. - Before: 1,325-1,354 `0x8007000e` refusals from the guard per run, `free_commit_mb=3929`, 0.1-0.2 fps from the world load on (three runs, 1440p and 4K). - After (default floors): `free_commit_mb=80761`; no commit refusal, 6 compiles put off by the physical-memory soft floor only, 30 `0x8007000e`; 5-18 fps in the world over 3 minutes. Still below the menus' 144 fps on this PC (free physical memory ~1.6 GB at ~29 GB committed), which this PR does not claim to fix. - `cargo test --locked -p victory-gpu --lib -- memguard compilemem pipeline::make`: 46 passed. - `cargo clippy -p victory-gpu --all-targets --no-deps -- -D warnings` reports the same 28 + 25 errors on main without this change, none in the two files touched. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #1173 (also touches `residency.rs`, pipeline worker throttling, not the guard's figures), #339 (merged, the same correction for the residency pass). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DrDarkDK commented 2026-11-29 13:20:03 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DrDarkDK on 2026-11-29T13:20:03Z.


I tested clean origin/main (829188e9) against this PR’s exact head (3ae5f5c8) on Windows 11 with an RTX 4070 Ti, Ryzen 9 7900X, and a system-managed pagefile. #2392 was the only code difference. Both runs used the same launch settings and loaded about 5,100 host pipelines from cache. I observed CPU usage near 100% on both builds.

Gameplay metric 829188e9 3ae5f5c8
Commit-floor compile deferrals logged, first 55 s At least 4 0
Median draws per frame, first 55 s 10,499 10,493
Median rendered FPS, first 55 s 12.75 13.8
Median rendered FPS, seconds 20–55 14.8 14.1

On main, the guard reported 290–1,173 MB of commit headroom when it deferred compiles. Around world load in that same run, residency reported about 77,000 MiB of available commit after counting potential pagefile growth.

The paired run reproduces the reported guard behavior on main and shows zero commit-floor deferrals on the PR build. The FPS comparison changes direction with the sampling window, so I can’t draw a performance conclusion from this pair.

AI-assisted with Codex.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256460185 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7256460185). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-29T13:20:03Z. --- I tested clean `origin/main` (`829188e9`) against this PR’s exact head (`3ae5f5c8`) on Windows 11 with an RTX 4070 Ti, Ryzen 9 7900X, and a system-managed pagefile. #2392 was the only code difference. Both runs used the same launch settings and loaded about 5,100 host pipelines from cache. I observed CPU usage near 100% on both builds. | Gameplay metric | `829188e9` | `3ae5f5c8` | |---|---:|---:| | Commit-floor compile deferrals logged, first 55 s | At least 4 | 0 | | Median draws per frame, first 55 s | 10,499 | 10,493 | | Median rendered FPS, first 55 s | 12.75 | 13.8 | | Median rendered FPS, seconds 20–55 | 14.8 | 14.1 | On main, the guard reported 290–1,173 MB of commit headroom when it deferred compiles. Around world load in that same run, residency reported about 77,000 MiB of available commit after counting potential pagefile growth. The paired run reproduces the reported guard behavior on main and shows zero commit-floor deferrals on the PR build. The FPS comparison changes direction with the sampling window, so I can’t draw a performance conclusion from this pair. *AI-assisted with Codex.*
fainty0 commented 2026-11-29 14:42:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by fainty0 on 2026-11-29T14:42:10Z.


Review: Request changes

PR #2392 makes compile admission and residency use the same commit-headroom estimate (crates/victory-gpu/src/memguard.rs:115, crates/victory-gpu/src/residency.rs:22–23,201,301). This addresses the mismatch behind #2385, but the optional-work estimate is too optimistic for the hard compile gate.

  1. Don't treat potential expansion as available commit (crates/victory-gpu/src/memguard.rs:103,115). Microsoft documents allocation failures from slow automatic pagefile growth. A system-managed file can grow subject to policy and available disk space; a fixed file cannot. Use estimated growth for soft scheduling (for example, serialise compiles below the normal floor), but require a conservative immediate-commit minimum before starting the driver compile. Describe the result as an estimate, not a promise.
  2. Preserve process limits (crates/victory-gpu/src/residency.rs:22–23,69–85). Per Microsoft, ullAvailPageFile is current process commit headroom in bytes, not free pagefile space; ullTotalPageFile can be process-capped. With 16 GiB RAM, a fixed 4 GiB file and a 16 GiB process cap, subtracting RAM yields a fictitious zero-byte file and can credit 4 GiB of non-existent growth. Use active pagefile sizes for growth and don't credit growth against process/job quotas. System-wide headroom is (CommitLimit − CommitTotal) × PageSize; CommitPeak is historical. The existing byte arithmetic is consistent; the MB knobs use MiB.
  3. Reconcile growth with fresh samples and apply caps per volume (crates/victory-gpu/src/residency.rs:64–87). Adding cached growth to fresh headroom double-counts expansion already reflected in the current limit for up to five seconds. The aggregate cap also allows disk space on a fixed-file volume to fund estimated growth on another, full volume.

Coverage and style: No new regression tests. The admission tests at crates/victory-gpu/src/memguard.rs:181–239 take precomputed headroom; crates/victory-gpu/src/residency.rs:403–411 checks parsing only. Add GPU/game-free tests for fixed files, quotas, per-volume limits, growth between samples and growth disabled. Why-docs fit the house style; no new unsafe, title-thread unwrap() or assets. VICTORY_COMMIT_GROWTH inherits a direct env read at crates/victory-gpu/src/residency.rs:41; use toggled! if changing that path.

Windows Clippy (829188e → 3ae5f5c): Both gates fail on both refs. --keep-going reports 5 → 5 default, 4 → 4 all-features; 0 added, 0 removed. Focused GPU checks report the same 30 default and 13 all-features GPU locations on both refs, none in changed files.

Policy: cargo xtask policy --staged passed for both changed files.

Not verified: Windows tests (not run; no Windows), live pagefile behaviour, claimed performance improvement, full all-features GPU or HLE linting.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7257509230 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7257509230). Originally posted by [fainty0](https://github.com/fainty0) on 2026-11-29T14:42:10Z. --- ## Review: Request changes PR #2392 makes compile admission and residency use the same commit-headroom estimate (`crates/victory-gpu/src/memguard.rs:115`, `crates/victory-gpu/src/residency.rs:22–23,201,301`). This addresses the mismatch behind #2385, but the optional-work estimate is too optimistic for the hard compile gate. 1. **Don't treat potential expansion as available commit (`crates/victory-gpu/src/memguard.rs:103,115`).** Microsoft [documents allocation failures from slow automatic pagefile growth](https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/slow-page-file-growth-memory-allocation-errors). A system-managed file [can grow subject to policy and available disk space](https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/how-to-determine-the-appropriate-page-file-size-for-64-bit-versions-of-windows); a fixed file cannot. Use estimated growth for soft scheduling (for example, serialise compiles below the normal floor), but require a conservative immediate-commit minimum before starting the driver compile. Describe the result as an estimate, not a promise. 2. **Preserve process limits (`crates/victory-gpu/src/residency.rs:22–23,69–85`).** Per [Microsoft](https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex), `ullAvailPageFile` is current process commit headroom in bytes, not free pagefile space; `ullTotalPageFile` can be process-capped. With 16 GiB RAM, a fixed 4 GiB file and a 16 GiB process cap, subtracting RAM yields a fictitious zero-byte file and can credit 4 GiB of non-existent growth. Use active pagefile sizes for growth and don't credit growth against process/job quotas. System-wide headroom is [`(CommitLimit − CommitTotal) × PageSize`](https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-performance_information); `CommitPeak` is historical. The existing byte arithmetic is consistent; the `MB` knobs use MiB. 3. **Reconcile growth with fresh samples and apply caps per volume (`crates/victory-gpu/src/residency.rs:64–87`).** Adding cached growth to fresh headroom double-counts expansion already reflected in the current limit for up to five seconds. The aggregate cap also allows disk space on a fixed-file volume to fund estimated growth on another, full volume. **Coverage and style:** No new regression tests. The admission tests at `crates/victory-gpu/src/memguard.rs:181–239` take precomputed headroom; `crates/victory-gpu/src/residency.rs:403–411` checks parsing only. Add GPU/game-free tests for fixed files, quotas, per-volume limits, growth between samples and growth disabled. Why-docs fit the house style; no new unsafe, title-thread `unwrap()` or assets. `VICTORY_COMMIT_GROWTH` inherits a direct env read at `crates/victory-gpu/src/residency.rs:41`; use `toggled!` if changing that path. **Windows Clippy (`829188e` → `3ae5f5c`):** Both gates fail on both refs. `--keep-going` reports 5 → 5 default, 4 → 4 all-features; 0 added, 0 removed. Focused GPU checks report the same 30 default and 13 all-features GPU locations on both refs, none in changed files. **Policy:** `cargo xtask policy --staged` passed for both changed files. **Not verified:** Windows tests (not run; no Windows), live pagefile behaviour, claimed performance improvement, full all-features GPU or HLE linting.
fainty0 commented 2026-11-29 14:43:06 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by fainty0 on 2026-11-29T14:43:06Z.

Review: CHANGES_REQUESTED


Review: Request changes

PR #2392 makes compile admission and residency use the same commit-headroom estimate (crates/victory-gpu/src/memguard.rs:115, crates/victory-gpu/src/residency.rs:22–23,201,301). This addresses the mismatch behind #2385, but the optional-work estimate is too optimistic for the hard compile gate.

  1. Don't treat potential expansion as available commit (crates/victory-gpu/src/memguard.rs:103,115). Microsoft documents allocation failures from slow automatic pagefile growth. A system-managed file can grow subject to policy and available disk space; a fixed file cannot. Use estimated growth for soft scheduling (for example, serialise compiles below the normal floor), but require a conservative immediate-commit minimum before starting the driver compile. Describe the result as an estimate, not a promise.
  2. Preserve process limits (crates/victory-gpu/src/residency.rs:22–23,69–85). Per Microsoft, ullAvailPageFile is current process commit headroom in bytes, not free pagefile space; ullTotalPageFile can be process-capped. With 16 GiB RAM, a fixed 4 GiB file and a 16 GiB process cap, subtracting RAM yields a fictitious zero-byte file and can credit 4 GiB of non-existent growth. Use active pagefile sizes for growth and don't credit growth against process/job quotas. System-wide headroom is (CommitLimit − CommitTotal) × PageSize; CommitPeak is historical. The existing byte arithmetic is consistent; the MB knobs use MiB.
  3. Reconcile growth with fresh samples and apply caps per volume (crates/victory-gpu/src/residency.rs:64–87). Adding cached growth to fresh headroom double-counts expansion already reflected in the current limit for up to five seconds. The aggregate cap also allows disk space on a fixed-file volume to fund estimated growth on another, full volume.

Coverage and style: No new regression tests. The admission tests at crates/victory-gpu/src/memguard.rs:181–239 take precomputed headroom; crates/victory-gpu/src/residency.rs:403–411 checks parsing only. Add GPU/game-free tests for fixed files, quotas, per-volume limits, growth between samples and growth disabled. Why-docs fit the house style; no new unsafe, title-thread unwrap() or assets. VICTORY_COMMIT_GROWTH inherits a direct env read at crates/victory-gpu/src/residency.rs:41; use toggled! if changing that path.

Windows Clippy (829188e → 3ae5f5c): Both gates fail on both refs. --keep-going reports 5 → 5 default, 4 → 4 all-features; 0 added, 0 removed. Focused GPU checks report the same 30 default and 13 all-features GPU locations on both refs, none in changed files.

Policy: cargo xtask policy --staged passed for both changed files.

Not verified: Windows tests (not run; no Windows), live pagefile behaviour, claimed performance improvement, full all-features GPU or HLE linting.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6103354412 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#pullrequestreview-6103354412). Originally posted by [fainty0](https://github.com/fainty0) on 2026-11-29T14:43:06Z. **Review:** CHANGES_REQUESTED --- ## Review: Request changes PR #2392 makes compile admission and residency use the same commit-headroom estimate (`crates/victory-gpu/src/memguard.rs:115`, `crates/victory-gpu/src/residency.rs:22–23,201,301`). This addresses the mismatch behind #2385, but the optional-work estimate is too optimistic for the hard compile gate. 1. **Don't treat potential expansion as available commit (`crates/victory-gpu/src/memguard.rs:103,115`).** Microsoft [documents allocation failures from slow automatic pagefile growth](https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/slow-page-file-growth-memory-allocation-errors). A system-managed file [can grow subject to policy and available disk space](https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/how-to-determine-the-appropriate-page-file-size-for-64-bit-versions-of-windows); a fixed file cannot. Use estimated growth for soft scheduling (for example, serialise compiles below the normal floor), but require a conservative immediate-commit minimum before starting the driver compile. Describe the result as an estimate, not a promise. 2. **Preserve process limits (`crates/victory-gpu/src/residency.rs:22–23,69–85`).** Per [Microsoft](https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex), `ullAvailPageFile` is current process commit headroom in bytes, not free pagefile space; `ullTotalPageFile` can be process-capped. With 16 GiB RAM, a fixed 4 GiB file and a 16 GiB process cap, subtracting RAM yields a fictitious zero-byte file and can credit 4 GiB of non-existent growth. Use active pagefile sizes for growth and don't credit growth against process/job quotas. System-wide headroom is [`(CommitLimit − CommitTotal) × PageSize`](https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-performance_information); `CommitPeak` is historical. The existing byte arithmetic is consistent; the `MB` knobs use MiB. 3. **Reconcile growth with fresh samples and apply caps per volume (`crates/victory-gpu/src/residency.rs:64–87`).** Adding cached growth to fresh headroom double-counts expansion already reflected in the current limit for up to five seconds. The aggregate cap also allows disk space on a fixed-file volume to fund estimated growth on another, full volume. **Coverage and style:** No new regression tests. The admission tests at `crates/victory-gpu/src/memguard.rs:181–239` take precomputed headroom; `crates/victory-gpu/src/residency.rs:403–411` checks parsing only. Add GPU/game-free tests for fixed files, quotas, per-volume limits, growth between samples and growth disabled. Why-docs fit the house style; no new unsafe, title-thread `unwrap()` or assets. `VICTORY_COMMIT_GROWTH` inherits a direct env read at `crates/victory-gpu/src/residency.rs:41`; use `toggled!` if changing that path. **Windows Clippy (`829188e` → `3ae5f5c`):** Both gates fail on both refs. `--keep-going` reports 5 → 5 default, 4 → 4 all-features; 0 added, 0 removed. Focused GPU checks report the same 30 default and 13 all-features GPU locations on both refs, none in changed files. **Policy:** `cargo xtask policy --staged` passed for both changed files. **Not verified:** Windows tests (not run; no Windows), live pagefile behaviour, claimed performance improvement, full all-features GPU or HLE linting.
dyshay commented 2026-11-29 15:40:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T15:40:10Z.


Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with --profile diag --features diagnostics, and the CPU tests of the touched crates pass. Runs on an RTX 4090 are queued (Series X 1440p, and Series S with ray tracing, DLSS Quality). Frame times will follow here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258271863 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7258271863). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-29T15:40:10Z. --- Merged into our fork's integration branch for testing ([dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA/tree/janus-prs), branch `janus-prs`). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with `--profile diag --features diagnostics`, and the CPU tests of the touched crates pass. Runs on an RTX 4090 are queued (Series X 1440p, and Series S with ray tracing, DLSS Quality). Frame times will follow here.
dyshay commented 2026-11-29 16:15:25 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T16:15:25Z.


We hit this independently on an RTX 4090, Series X profile at 1440p with ray tracing (64 GB RAM, system-managed page file). Two things combined:

  • The guard saw 2–4 GB of commit left, while the page file could still grow by about 70 GB. It put off every new compile.
  • The screen-pass wait slept for its whole budget although the compile had been put off. Every frame took 10 s (0.1 fps for the whole run, 245 compiles put off).

Our fix does the same two things as #2188 and #2392 together: the wait ends when the compile is put off, and the guard counts what the page file can still grow by. It is in dyshay/VIctory-NVIDIA. Same scene and settings, measured on the card:

median p95 compiles put off 10 s screen waits
before ~10,000 ms ~10,080 ms 4,000+ 23
after 69.6 ms 277 ms 2 0

So the change is confirmed on a second machine. The tests that reproduce the wait (10 s before, immediate after) are in our commit 06ff9b27 if you want them.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258741559 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7258741559). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-29T16:15:25Z. --- We hit this independently on an RTX 4090, Series X profile at 1440p with ray tracing (64 GB RAM, system-managed page file). Two things combined: - The guard saw 2–4 GB of commit left, while the page file could still grow by about 70 GB. It put off every new compile. - The screen-pass wait slept for its whole budget although the compile had been put off. Every frame took 10 s (0.1 fps for the whole run, 245 compiles put off). Our fix does the same two things as #2188 and #2392 together: the wait ends when the compile is put off, and the guard counts what the page file can still grow by. It is in [dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA). Same scene and settings, measured on the card: | | median | p95 | compiles put off | 10 s screen waits | |---|---|---|---|---| | before | ~10,000 ms | ~10,080 ms | 4,000+ | 23 | | after | 69.6 ms | 277 ms | 2 | 0 | So the change is confirmed on a second machine. The tests that reproduce the wait (10 s before, immediate after) are in our commit `06ff9b27` if you want them.
nick0451 commented 2026-11-29 16:47:21 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T16:47:21Z.


Independent confirmation: I wrote the same 2-line change last night (same figures_now() → residency::available_commit(&m), available_commit made pub(crate)) and tested it on another configuration, so I'll back this one rather than open a duplicate. Report with the bisect on #1625.

PC: RTX 3090 24 GB, i9-14900K, 32 GB RAM, Windows 11, system-managed pagefile, Series S. Other programs held most of the commit (~15 GB of a 73 GB limit free with the game not running). Every start was a fresh executable name and hash, on the same frozen save.

build fresh starts reaching the world hr=0x8007000e pipeline failures
main 568c5e5 yes (54 s) 0
main 829188e9 no (stuck at the title 5 min; layer private 4 → 18.6 GB) 3,070
main 829188e9, VICTORY_COMPILE_MEMORY=0 2 / 2 0
main 829188e9 + this change 2 / 2 (58-64 s) 25-32 early, then it recovers (6-7 compiles put off per start)

The 23 memguard/compilemem/residency tests passed with it. Clippy has nothing on the changed lines.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7259177428 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7259177428). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-29T16:47:21Z. --- Independent confirmation: I wrote the same 2-line change last night (same `figures_now()` → `residency::available_commit(&m)`, `available_commit` made `pub(crate)`) and tested it on another configuration, so I'll back this one rather than open a duplicate. Report with the bisect on #1625. **PC:** RTX 3090 24 GB, i9-14900K, 32 GB RAM, Windows 11, system-managed pagefile, Series S. Other programs held most of the commit (~15 GB of a 73 GB limit free with the game not running). Every start was a fresh executable name and hash, on the same frozen save. | build | fresh starts reaching the world | `hr=0x8007000e` pipeline failures | |---|---|---| | main `568c5e5` | yes (54 s) | 0 | | main `829188e9` | **no** (stuck at the title 5 min; layer private 4 → 18.6 GB) | 3,070 | | main `829188e9`, `VICTORY_COMPILE_MEMORY=0` | 2 / 2 | 0 | | main `829188e9` + this change | **2 / 2** (58-64 s) | 25-32 early, then it recovers (6-7 compiles put off per start) | The 23 memguard/compilemem/residency tests passed with it. Clippy has nothing on the changed lines. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
L-696 commented 2026-11-29 17:08:40 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by L-696 on 2026-11-29T17:08:40Z.


Additional Windows 11 laptop test on RTX 4060 Laptop (8 GB), i7-13650HX and 32 GB RAM. Baseline was v2026.11.29.01 (829188e9). The comparison build applied #2392 to memguard.rs and residency.rs. Both used Series X, fixed 2560×1440 output, DLSS Performance, DLSS FG 2× and BVH requested.

Run Host PSO failures Outcome
Release, about 1m38s 28 × 0x8007000E (21 compute, 7 mesh) Device removed (0x887A0005)
Local #2392, first gameplay run 1 × 0x8007000E (compute) No device removal observed
Local #2392, two subsequent runs with descriptor/eviction settings varied 0 in each final summary No device removal observed

The route and cache state were not strictly matched. These are observed counts, not evidence that the patch fixes device removal. Movement-triggered material corruption still repros (#2464).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7259457163 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7259457163). Originally posted by [L-696](https://github.com/L-696) on 2026-11-29T17:08:40Z. --- Additional Windows 11 laptop test on RTX 4060 Laptop (8 GB), i7-13650HX and 32 GB RAM. Baseline was v2026.11.29.01 (829188e9). The comparison build applied #2392 to memguard.rs and residency.rs. Both used Series X, fixed 2560×1440 output, DLSS Performance, DLSS FG 2× and BVH requested. | Run | Host PSO failures | Outcome | | --- | --- | --- | | Release, about 1m38s | 28 × 0x8007000E (21 compute, 7 mesh) | Device removed (0x887A0005) | | Local #2392, first gameplay run | 1 × 0x8007000E (compute) | No device removal observed | | Local #2392, two subsequent runs with descriptor/eviction settings varied | 0 in each final summary | No device removal observed | The route and cache state were not strictly matched. These are observed counts, not evidence that the patch fixes device removal. Movement-triggered material corruption still repros (#2464).
frame18studios commented 2026-11-29 17:16:42 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by frame18studios on 2026-11-29T17:16:42Z.


A/B confirmation on v2026.11.29.01 (RTX 5070 Ti Laptop, ~32 GB RAM, Series X, 2560x1440, DLSS Balanced). The GPU code in our local build has only this change on top of the release; memguard.rs/residency.rs are byte-identical to this PR's head 3ae5f5c8 (same patch-id), so this is a confirmation rather than a competing implementation.

Stock official exe 0D3DAE51870BAD44AA529C9FDDD762A513D677FF8D08147134968BA7ED67DFFD:

  • free_commit_mb fell 3866 -> 1098 -> 382, reason "the commit left would fall under its floor".
  • The final refusal line was 46 host pipelines failed (3 compute, 13 graphics, 30 mesh), all 0x8007000e, retried=0, 0 shaders do not translate.
  • Displayed FPS (MSI Afterburner) was 10-15, later around 30 with high latency. The last gameplay host line was 9.8 fps, 101.9 ms/frame.

With this patch:

  • free_commit_mb stayed around 69100; there were no commit-floor deferrals in the log, only the startup line.
  • The final refusal line was 0 host pipelines failed (none), 0 shaders do not translate.
  • Gameplay host lines were 10.7-20.4 fps (last 17.9 fps, 56.0 ms/frame); displayed FPS was 15 with drops to 8.

The two runs are not a controlled FPS comparison: frame generation was x4 in the stock run and off in the patched run (the saved menu setting had changed), so please read the pipeline-refusal counts as the A/B result. The exposure/negative-colour pulse and texture artefacts came from a separate local shader-fold patch, which has been reverted; this change does not touch shader translation or presentation.

VICTORY_COMMIT_GROWTH=0 still gives the old, momentary-limit-only accounting. This confirms the stall in #2385: with roughly 3.9 GB under the momentary limit, compiles were refused even while RAM and pagefile headroom were available.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7259563580 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7259563580). Originally posted by [frame18studios](https://github.com/frame18studios) on 2026-11-29T17:16:42Z. --- A/B confirmation on `v2026.11.29.01` (RTX 5070 Ti Laptop, ~32 GB RAM, Series X, 2560x1440, DLSS Balanced). The GPU code in our local build has only this change on top of the release; `memguard.rs`/`residency.rs` are byte-identical to this PR's head `3ae5f5c8` (same patch-id), so this is a confirmation rather than a competing implementation. **Stock official exe** `0D3DAE51870BAD44AA529C9FDDD762A513D677FF8D08147134968BA7ED67DFFD`: - `free_commit_mb` fell `3866 -> 1098 -> 382`, reason "the commit left would fall under its floor". - The final refusal line was `46 host pipelines failed (3 compute, 13 graphics, 30 mesh)`, all `0x8007000e`, `retried=0`, `0 shaders do not translate`. - Displayed FPS (MSI Afterburner) was 10-15, later around 30 with high latency. The last gameplay host line was `9.8 fps, 101.9 ms/frame`. **With this patch**: - `free_commit_mb` stayed around `69100`; there were no commit-floor deferrals in the log, only the startup line. - The final refusal line was `0 host pipelines failed (none), 0 shaders do not translate`. - Gameplay host lines were `10.7-20.4 fps` (last `17.9 fps, 56.0 ms/frame`); displayed FPS was 15 with drops to 8. The two runs are not a controlled FPS comparison: frame generation was `x4` in the stock run and off in the patched run (the saved menu setting had changed), so please read the pipeline-refusal counts as the A/B result. The exposure/negative-colour pulse and texture artefacts came from a separate local shader-fold patch, which has been reverted; this change does not touch shader translation or presentation. `VICTORY_COMMIT_GROWTH=0` still gives the old, momentary-limit-only accounting. This confirms the stall in #2385: with roughly 3.9 GB under the momentary limit, compiles were refused even while RAM and pagefile headroom were available.
Lyrnc commented 2026-11-29 23:20:15 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-29T23:20:15Z.


Tested on an RTX 5080 + 9800X3D with 32 GB RAM and a system-managed page file. Series S, DLSS Quality, FG and RT off, standing still in the world, 300 s per run, all on 829188e9. Cold means the driver pipeline cache was deleted first. The columns are fps, compiles put off, and pipelines failed with 0x8007000E.

Build Cold Warm
829188e9 0.1–0.2 / 1,337 / 1,272 (never leaves loading) 23.5
#2886 alone 0.4 / 172 / 70 25.9, but 636 put off and 276 refused, so draws are dropped
this PR alone 0.2 / 332 / 138 23.0
#2886 + this PR (merge cleanly) 22.4 / 0 / 0 25.4 / 0 / 0

On this PC, free commit sits at 0.3–2 GB in the world, and this PR is what lifts it over the commit floor. Even with this PR, free physical memory stays under the 1 GB soft floor. #2886's lower floor for pipelines put off again and again is what gets those through. Together they fix the cold-start stall; alone, neither does. The default-off alternative and its numbers are in #3347.

AI use: Claude Code (Claude Opus 5.5) ran these runs and wrote this comment.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7264382944 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7264382944). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-29T23:20:15Z. --- Tested on an RTX 5080 + 9800X3D with 32 GB RAM and a system-managed page file. Series S, DLSS Quality, FG and RT off, standing still in the world, 300 s per run, all on 829188e9. Cold means the driver pipeline cache was deleted first. The columns are fps, compiles put off, and pipelines failed with `0x8007000E`. | Build | Cold | Warm | |---|---|---| | 829188e9 | 0.1–0.2 / 1,337 / 1,272 (never leaves loading) | 23.5 | | #2886 alone | 0.4 / 172 / 70 | 25.9, but 636 put off and 276 refused, so draws are dropped | | this PR alone | 0.2 / 332 / 138 | 23.0 | | **#2886 + this PR** (merge cleanly) | **22.4 / 0 / 0** | **25.4 / 0 / 0** | On this PC, free commit sits at 0.3–2 GB in the world, and this PR is what lifts it over the commit floor. Even with this PR, free physical memory stays under the 1 GB soft floor. #2886's lower floor for pipelines put off again and again is what gets those through. Together they fix the cold-start stall; alone, neither does. The default-off alternative and its numbers are in #3347. AI use: Claude Code (Claude Opus 5.5) ran these runs and wrote this comment.
nick0451 commented 2026-11-30 00:04:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-30T00:04:01Z.


For whoever merges: six open PRs change the same stall (compiles put off under the commit floor, 0.1–0.3 fps). Here is how they fit together, checked with git merge-tree against main 41adb551 (v2026.11.29.05) and against each other. This is from reading the diffs only, with no runs.

PR what it changes
#2392 (this) the compile gate counts pagefile growth, as residency already does
#2886 a lower commit floor for a pipeline put off again and again
#3347 compile admission off by default
#3426 memory refusals can be retried; on hosts with ≤ 32 GiB RAM, residency counts the commit of the moment only (no pagefile growth)
#3474 one compile at a time under the floor; refusals retried with back-off; a compile's cost measured without the title's card loads
#3398 a draw's wait ends when its compile is put off

One semantic point between #2392 and #3426. They go in opposite directions on ≤ 32 GiB hosts:

  • #2392 makes the compile gate count pagefile growth, so the gate and residency agree.
  • #3426 makes residency (texture admission, pressure, the critical floor) stop counting it there (limited_host_ram(): ullTotalPhys <= 32 GiB).
  • With both merged, a 32 GB PC would have the compile gate counting growth and texture admission not. That may be what you want, since textures would back off before compiles. But it contradicts #2392's comment that the two count alike, so one rule should be picked.
  • (Corrected: I first wrote that my evidence came from a 64 GB PC. This PC has 32 GB, 31.8 GiB as Windows reports it.) So #3426's limited-host rule does apply here. My evidence for #2392 is from a 32 GB PC: with it, 2 of 2 starts reached the world in about 60 s; without it, 0. That differs from Lyrnc's 32 GB result below (#2392 alone 0.2 fps), so something besides RAM size decides it. Pagefile size or what else the PC has committed are my guesses.

Lyrnc's runs above (32 GB: #2392 + #2886 together 22.4 fps cold, either alone 0.2–0.4) suggest the 32 GB case needs a second piece whichever way this goes.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7264939083 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392#issuecomment-7264939083). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-30T00:04:01Z. --- For whoever merges: six open PRs change the same stall (compiles put off under the commit floor, 0.1–0.3 fps). Here is how they fit together, checked with `git merge-tree` against main `41adb551` (v2026.11.29.05) and against each other. This is from reading the diffs only, with no runs. | PR | what it changes | |---|---| | #2392 (this) | the compile gate counts pagefile growth, as `residency` already does | | #2886 | a lower commit floor for a pipeline put off again and again | | #3347 | compile admission off by default | | #3426 | memory refusals can be retried; on hosts with ≤ 32 GiB RAM, `residency` counts the commit of the moment only (no pagefile growth) | | #3474 | one compile at a time under the floor; refusals retried with back-off; a compile's cost measured without the title's card loads | | #3398 | a draw's wait ends when its compile is put off | - Each one merges cleanly into main on its own. - These pairs conflict, all in `pipeline/make.rs`: #2886 + #3474, #2886 + #3398, #3426 + #3474, #3398 + #3426. - #2392 merges cleanly with each of the others. One semantic point between #2392 and #3426. They go in opposite directions on ≤ 32 GiB hosts: - #2392 makes the compile gate count pagefile growth, so the gate and `residency` agree. - #3426 makes `residency` (texture admission, pressure, the critical floor) stop counting it there (`limited_host_ram()`: `ullTotalPhys <= 32 GiB`). - With both merged, a 32 GB PC would have the compile gate counting growth and texture admission not. That may be what you want, since textures would back off before compiles. But it contradicts #2392's comment that the two count alike, so one rule should be picked. - *(Corrected: I first wrote that my evidence came from a 64 GB PC. This PC has 32 GB, 31.8 GiB as Windows reports it.)* So #3426's limited-host rule **does** apply here. My evidence for #2392 is from a 32 GB PC: with it, 2 of 2 starts reached the world in about 60 s; without it, 0. That differs from Lyrnc's 32 GB result below (#2392 alone 0.2 fps), so something besides RAM size decides it. Pagefile size or what else the PC has committed are my guesses. Lyrnc's runs above (32 GB: #2392 + #2886 together 22.4 fps cold, either alone 0.2–0.4) suggest the 32 GB case needs a second piece whichever way this goes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!2392
No description provided.