HLE: allow temporary file backing for physical pages on Wine #829

Open
Filip722 wants to merge 4 commits from upstream-pr/830 into main
Filip722 commented 2026-11-25 09:33:23 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-25T09:33:23Z.


Physical-page mappings can consume several GiB of host shared memory on Wine. VICTORY_PHYSICAL_BACKING_DIR lets users put these sections in temporary files on a writable local filesystem so the kernel can reclaim file-backed pages. The directory must be outside the checkout. This is opt-in and trades host-memory pressure for disk I/O.

  • Create a temporary file for each opted-in Wine section and keep the shared mapping alive through the existing section handle.
  • Check the directory with the existing asset-policy path guard before creating a file.
  • Report backing creation and mapping failures through the existing physical-page allocation error path.

Validation

  • Windows MSVC release build and focused HLE tests, using Rust 1.98.1 and Cargo xwin.
  • Under GE-Proton 11-14, the aliasing, cross-allocation writes and mapped-page lookup tests passed with each backing mode (six exact executions). An additional negative probe rejected a checkout directory before allocating a physical section. The temporary backing directory was empty after the positive tests.
  • Staged and full cargo xtask policy checks passed.

An offline loading comparison on a Series S experimental build measured the same backing approach on Bazzite 44, RTX 5060 Laptop 8 GB, 16 GB system RAM, NVIDIA 615.78.08 and vkd3d-proton 3.2.0. At about 404 s, process-group shared memory was 3,021 MiB with pagefile backing and 9 MiB with file backing, while host memory available was 6,137 MiB and 8,993 MiB, respectively. The file-backed run needed about 4 GiB of scratch space. That comparison used a pre-initialized prefix and a different write cap for the file-backed arm, and neither arm verified rendered gameplay. The exact PR revision was exercised by the focused HLE tests above.

OpenAI Codex (GPT-6.2-Sol High) prepared the patch, ran the tests and drafted this description.

Cleanup after a forced stop

The README now recommends a dedicated backing directory per run. Normal release cleared the directory in the unit tests. A separate Series X run stopped externally by SIGTERM left three files behind, occupying about 5.82 GiB on disk. Once the run and its Wine processes have exited, delete that run's remaining backing files. The README update was prepared with OpenAI Codex (GPT-6.2-Sol High) assistance.

I reran the full XMem group on fork main c36971b with this patch and #836 applied locally. The Windows MSVC release harness passed 12/12 with Wine default backing and 12/12 with file backing under GE-Proton 11-14. The backing directory was empty after the normal test exit. Codex (GPT-6.2-Sol High) ran the retest.

<!-- greyfinch-sync:fxceless/victory-fork:issue:5488719475 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-25T09:33:23Z. --- Physical-page mappings can consume several GiB of host shared memory on Wine. `VICTORY_PHYSICAL_BACKING_DIR` lets users put these sections in temporary files on a writable local filesystem so the kernel can reclaim file-backed pages. The directory must be outside the checkout. This is opt-in and trades host-memory pressure for disk I/O. - Create a temporary file for each opted-in Wine section and keep the shared mapping alive through the existing section handle. - Check the directory with the existing asset-policy path guard before creating a file. - Report backing creation and mapping failures through the existing physical-page allocation error path. **Validation** - Windows MSVC release build and focused HLE tests, using Rust 1.98.1 and Cargo xwin. - Under GE-Proton 11-14, the aliasing, cross-allocation writes and mapped-page lookup tests passed with each backing mode (six exact executions). An additional negative probe rejected a checkout directory before allocating a physical section. The temporary backing directory was empty after the positive tests. - Staged and full `cargo xtask policy` checks passed. An offline loading comparison on a Series S experimental build measured the same backing approach on Bazzite 44, RTX 5060 Laptop 8 GB, 16 GB system RAM, NVIDIA 615.78.08 and vkd3d-proton 3.2.0. At about 404 s, process-group shared memory was **3,021 MiB with pagefile backing** and **9 MiB with file backing**, while host memory available was **6,137 MiB** and **8,993 MiB**, respectively. The file-backed run needed about 4 GiB of scratch space. That comparison used a pre-initialized prefix and a different write cap for the file-backed arm, and neither arm verified rendered gameplay. The exact PR revision was exercised by the focused HLE tests above. OpenAI Codex (GPT-6.2-Sol High) prepared the patch, ran the tests and drafted this description. ### Cleanup after a forced stop The README now recommends a dedicated backing directory per run. Normal release cleared the directory in the unit tests. A separate Series X run stopped externally by SIGTERM [left three files behind](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7171357495), occupying about 5.82 GiB on disk. Once the run and its Wine processes have exited, delete that run's remaining backing files. The README update was prepared with OpenAI Codex (GPT-6.2-Sol High) assistance. I reran the full XMem group on fork main `c36971b` with this patch and #836 applied locally. The Windows MSVC release harness passed **12/12** with Wine default backing and **12/12** with file backing under GE-Proton 11-14. The backing directory was empty after the normal test exit. Codex (GPT-6.2-Sol High) ran the retest.
ArturoWolff commented 2026-11-25 11:10:36 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ArturoWolff on 2026-11-25T10:21:54Z.


Independent Linux check on Filip722’s 951dc00: the full modules::xmem::tests:: group passed under GE-Proton 11-14 with both backing modes. I used the same Rust 1.97.1 GNU/LLVM Windows release test binary, separate copies of the same initialized prefix, and --test-threads=1.

VICTORY_PHYSICAL_BACKING_DIR Result
Unset (Wine default) 12 passed, 0 failed
Writable external directory 12 passed, 0 failed; directory empty after exit
Nonexistent directory (negative control, alias test only) XMemAllocatePhysicalPages returned 0 instead of 1 at xmem.rs:1184; test exited 101 as expected

This reproduces the PR’s three focused cases and adds coverage for the test that reads while another thread remaps pages. The negative control distinguishes an invalid directory from leaving the option unset. No retail title was launched for those unit tests; this does not measure memory savings or establish world rendering. Our previous Series S runs stopped at the host memory floor without this patch.

180 s retail comparison (separate from the unit tests). On an RTX 4060 / 16 GiB host under GE-Proton 11-14, I ran the same locally built Series S executable offline, first with file backing and then with the option unset. The executable and five graphics DLL hashes matched. Both guards reached the scheduled 180 s stop, with no host OOM kill. Both final captures showed the same dark screen with prompts at lower right; neither demonstrated a visible world.

Game cgroup (MiB) Wine default File backing
Shared memory, last sample 321.25 2.04
Total charged memory, last sample 2316.69 4873.68
Peak charged memory during run 3902.32 5808.04

The shared-memory change agrees in direction with the author’s longer test. Total cgroup charge was higher, not lower, with file backing in this pair. One run per mode, fixed order, and no cold-cache control: these are not whole-system RAM savings or equivalent internal game progress. Each run also yielded 11 title-stream audio blocks (1,081,344 samples per run), all zero. No captures or retail data attached.

Windowed host measurement, same two runs (no rerun). Over the 30 seconds ending at each run’s last 11-draws/frame report (75 samples per arm), median Linux MemAvailable was 5.771 GiB with Wine default vs 6.646 GiB with file backing. The file-backed arm started with 8.943 GiB available vs 8.723 GiB for default; relative to those initial samples the observed drop was about 0.66 GiB smaller. Median game-cgroup swap was 872.34 MiB vs 0.09 MiB (default vs file). This is consistent with more headroom here, not an independent reproduction of the author’s ~2.8 GiB difference at 404 s: the runs were sequential, the host metric includes other processes, and matching the draw count and visible prompt does not establish identical guest progress.

AI disclosure: Hermes Agent ran the tests, analyzed the retained samples, and wrote this update for ArturoWolff.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7159593359 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7159593359). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-25T10:21:54Z. --- Independent Linux check on Filip722’s `951dc00`: the full `modules::xmem::tests::` group passed under GE-Proton 11-14 with both backing modes. I used the same Rust 1.97.1 GNU/LLVM Windows release test binary, separate copies of the same initialized prefix, and `--test-threads=1`. | `VICTORY_PHYSICAL_BACKING_DIR` | Result | |---|---| | Unset (Wine default) | 12 passed, 0 failed | | Writable external directory | 12 passed, 0 failed; directory empty after exit | | Nonexistent directory (negative control, alias test only) | `XMemAllocatePhysicalPages` returned `0` instead of `1` at `xmem.rs:1184`; test exited 101 as expected | This reproduces the PR’s three focused cases and adds coverage for the test that reads while another thread remaps pages. The negative control distinguishes an invalid directory from leaving the option unset. No retail title was launched for those unit tests; this does not measure memory savings or establish world rendering. Our previous [Series S runs](https://github.com/fxceless/victory-fork/pull/188#issuecomment-7157115867) stopped at the host memory floor without this patch. **180 s retail comparison (separate from the unit tests).** On an RTX 4060 / 16 GiB host under GE-Proton 11-14, I ran the same locally built Series S executable offline, first with file backing and then with the option unset. The executable and five graphics DLL hashes matched. Both guards reached the scheduled 180 s stop, with no host OOM kill. Both final captures showed the same dark screen with prompts at lower right; neither demonstrated a visible world. | Game cgroup (MiB) | Wine default | File backing | |---|---:|---:| | Shared memory, last sample | 321.25 | 2.04 | | Total charged memory, last sample | 2316.69 | 4873.68 | | Peak charged memory during run | 3902.32 | 5808.04 | The shared-memory change agrees in direction with the author’s longer test. Total cgroup charge was **higher**, not lower, with file backing in this pair. One run per mode, fixed order, and no cold-cache control: these are not whole-system RAM savings or equivalent internal game progress. Each run also yielded 11 title-stream audio blocks (1,081,344 samples per run), all zero. No captures or retail data attached. **Windowed host measurement, same two runs (no rerun).** Over the 30 seconds ending at each run’s last 11-draws/frame report (75 samples per arm), median Linux `MemAvailable` was 5.771 GiB with Wine default vs 6.646 GiB with file backing. The file-backed arm started with 8.943 GiB available vs 8.723 GiB for default; relative to those initial samples the observed drop was about 0.66 GiB smaller. Median game-cgroup swap was 872.34 MiB vs 0.09 MiB (default vs file). This is consistent with more headroom here, not an independent reproduction of the author’s ~2.8 GiB difference at 404 s: the runs were sequential, the host metric includes other processes, and matching the draw count and visible prompt does not establish identical guest progress. AI disclosure: Hermes Agent ran the tests, analyzed the retained samples, and wrote this update for ArturoWolff.
MamaLeVrai commented 2026-11-25 13:06:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T12:23:44Z.


Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head 951dc00 into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with the errors main itself has on this machine (placed_filler_twins, depth_written, a sort, and manual implementation of .is_multiple_of() at victory-gpu/src/shadow.rs:2675; PR #841 fixes the first three), also with --all-features; this PR adds none. (Correction: my first version of this report said that the is_multiple_of one was extra here. It is in main too: my first baseline run of main did not list it, and a run with --keep-going on a clean main does.) cargo test --workspace --locked: run 1: stopped at indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields (the one that fails on main itself most runs here (PR #849 and #847 fix its assertion)); run 2: 565 passed, 0 failed, 12 ignored (main alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162314568 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7162314568). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T12:23:44Z. --- Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `951dc00` into `main` `f85101b` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with the errors `main` itself has on this machine (`placed_filler_twins`, `depth_written`, a sort, and `manual implementation of .is_multiple_of()` at `victory-gpu/src/shadow.rs:2675`; PR #841 fixes the first three), also with `--all-features`; this PR adds none. (Correction: my first version of this report said that the `is_multiple_of` one was extra here. It is in `main` too: my first baseline run of `main` did not list it, and a run with `--keep-going` on a clean `main` does.) `cargo test --workspace --locked`: run 1: stopped at `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` (the one that fails on `main` itself most runs here (PR #849 and #847 fix its assertion)); run 2: 565 passed, 0 failed, 12 ignored (`main` alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
ArturoWolff commented 2026-11-25 19:09:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ArturoWolff on 2026-11-25T18:45:36Z.


Follow-up to the earlier Series S report: the Wine backing option now made it past our previous host-memory stop on a Series X run, though the game still showed black frames rather than visible gameplay.

Setup: desktop Ryzen 5 5600 / RTX 4060 8 GB / 16 GB system RAM, NVIDIA 620.73.04, Linux / GE-Proton11-14. Built unmodified #1056 head c5820acd4fc24a387396dc6ccef051115cbe9813 plus Filip722's 951dc00c6e8cd9479da8819affdd9b6cdd2dd3d3 patch (applied cleanly), Rust 1.98.1 Windows GNU/LLVM release with diagnostics. Both arms used exactly the same executable, separate copies of the same initialized profile and matching cache/save/driver manifests, no initial early-list file, --console series-x, VICTORY_DISPLAY_MODE=1920x1080, VICTORY_TEXTURE_GUARD=0, VICTORY_TEXTURE_NO_WAIT=1. Only the backing-directory option differed. Offline, one run per mode, control first, same 768 MiB host-memory guard and 210 s scheduled limit.

At the common illustrated loading screen (~45 s from the first sample, screenshots of the same scene), the nearest cgroup/host samples were:

MiB Default pagefile Temporary file backing
Host MemAvailable 6,281 7,480
Game cgroup shmem 986 2
Game cgroup swap 294 0.08
Charged memory 5,174 5,001

At the end of each run:

Default File-backed
Elapsed (wrapper) 150 s 213 s
Stop Host memory guard Scheduled stop
Host available at last sample 760 MiB 3,496 MiB
Peak game cgroup memory 8,195 MiB 8,737 MiB
Peak game cgroup swap 4,665 MiB 2,621 MiB
Peak whole-GPU use (incl. desktop) 4,978 MiB 5,936 MiB
Host OOM kills 0 0

The control received one recorded A press at the visible account picker and showed loading artwork. The file-backed run reached the same artwork without a captured matching A prompt/press. Consequently these are observational measurements, not a matched input or FPS comparison. The file-backed run then produced black frames while the log reported about 4,000 indirect commands/frame and hundreds of pipelines still being made. Neither run displayed a verified 3D world or player control. No device-removal or E_OUTOFMEMORY message identified in these logs.

Cleanup caveat: all three file-backed allocations logged the intended path (total requested 7,477,395,456 bytes). After our external scheduled SIGTERM and confirmed service retirement, three regular files remained in the dedicated backing directory, with that same total logical length and 6,254,604,288 bytes allocated on disk. Earlier orderly unit-test exits left the directory empty; this is an abrupt-stop observation, not a normal-close failure. io.stat was unavailable in the game cgroup, so total I/O cost was not measured. The residual files are private and not attached. This supports experimenting further with the option on our memory-limited Linux box, not reducing the guard or claiming a rendering fix.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7171357495 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7171357495). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-25T18:45:36Z. --- Follow-up to the earlier Series S report: the Wine backing option now made it past our previous host-memory stop on a Series X run, though the game still showed black frames rather than visible gameplay. **Setup:** desktop Ryzen 5 5600 / RTX 4060 8 GB / 16 GB system RAM, NVIDIA 620.73.04, Linux / GE-Proton11-14. Built unmodified #1056 head `c5820acd4fc24a387396dc6ccef051115cbe9813` plus Filip722's `951dc00c6e8cd9479da8819affdd9b6cdd2dd3d3` patch (applied cleanly), Rust 1.98.1 Windows GNU/LLVM release with diagnostics. Both arms used exactly the same executable, separate copies of the same initialized profile and matching cache/save/driver manifests, no initial early-list file, `--console series-x`, `VICTORY_DISPLAY_MODE=1920x1080`, `VICTORY_TEXTURE_GUARD=0`, `VICTORY_TEXTURE_NO_WAIT=1`. Only the backing-directory option differed. Offline, one run per mode, control first, same 768 MiB host-memory guard and 210 s scheduled limit. At the common illustrated loading screen (~45 s from the first sample, screenshots of the same scene), the nearest cgroup/host samples were: | MiB | Default pagefile | Temporary file backing | |---|---:|---:| | Host MemAvailable | 6,281 | 7,480 | | Game cgroup shmem | 986 | 2 | | Game cgroup swap | 294 | 0.08 | | Charged memory | 5,174 | 5,001 | At the end of each run: | | Default | File-backed | |---|---:|---:| | Elapsed (wrapper) | 150 s | 213 s | | Stop | Host memory guard | Scheduled stop | | Host available at last sample | 760 MiB | 3,496 MiB | | Peak game cgroup memory | 8,195 MiB | 8,737 MiB | | Peak game cgroup swap | 4,665 MiB | 2,621 MiB | | Peak whole-GPU use (incl. desktop) | 4,978 MiB | 5,936 MiB | | Host OOM kills | 0 | 0 | The control received one recorded A press at the visible account picker and showed loading artwork. The file-backed run reached the same artwork without a captured matching A prompt/press. Consequently these are observational measurements, not a matched input or FPS comparison. The file-backed run then produced black frames while the log reported about 4,000 indirect commands/frame and hundreds of pipelines still being made. Neither run displayed a verified 3D world or player control. No device-removal or E_OUTOFMEMORY message identified in these logs. **Cleanup caveat:** all three file-backed allocations logged the intended path (total requested 7,477,395,456 bytes). After our external scheduled SIGTERM and confirmed service retirement, three regular files remained in the dedicated backing directory, with that same total logical length and 6,254,604,288 bytes allocated on disk. Earlier orderly unit-test exits left the directory empty; this is an abrupt-stop observation, not a normal-close failure. `io.stat` was unavailable in the game cgroup, so total I/O cost was not measured. The residual files are private and not attached. This supports experimenting further with the option on our memory-limited Linux box, not reducing the guard or claiming a rendering fix. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol).
Filip722 commented 2026-11-26 01:06:17 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-26T00:54:55Z.


A follow-up hardware test reached the first rendered Series S opening scene using temporary file-backed physical pages on Bazzite 44. The laptop has an Intel CPU, 16 GB system RAM and an RTX 5060 Laptop GPU with 8 GiB VRAM. Runtime was GE-Proton11-14, vkd3d-proton cae8353ed7959c4+, NVIDIA 615.78.08. The local integration is based on main dc4c0fc.

The same executable and warm seed had previously reached two Presents and hit the title stall watchdog with a 24 MiB/s local NVMe write cap. At 32 MiB/s, it passed the opening title card, rendered a character and environment, and returned eight post-upscale Presents. The local memory-pressure guard stopped that run before input could be verified. Peak title cgroup memory was 10.5 GiB and title swap was 1.12 GiB. This is the furthest observed milestone from one run at each cap.

Later, the twelve XMem fixtures passed on ext4 loop backing, direct Btrfs NOCOW backing, and a private NFS-backed scratch directory. A title run with only the temporary backing on NFS completed 105 post-upscale Presents and rendered more of the opening credits. Local NVMe utilization was near zero during its final render interval. The local host memory-pressure stop ended the run before a gameplay input check.

Codex (GPT-6.2-Sol High) assisted with the builds and diagnostics.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7179241371 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7179241371). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-26T00:54:55Z. --- A follow-up hardware test reached the first rendered Series S opening scene using temporary file-backed physical pages on Bazzite 44. The laptop has an Intel CPU, 16 GB system RAM and an RTX 5060 Laptop GPU with 8 GiB VRAM. Runtime was GE-Proton11-14, vkd3d-proton `cae8353ed7959c4+`, NVIDIA 615.78.08. The local integration is based on main `dc4c0fc`. The same executable and warm seed had previously reached two Presents and hit the title stall watchdog with a 24 MiB/s local NVMe write cap. At 32 MiB/s, it passed the opening title card, rendered a character and environment, and returned eight post-upscale Presents. The local memory-pressure guard stopped that run before input could be verified. Peak title cgroup memory was 10.5 GiB and title swap was 1.12 GiB. This is the furthest observed milestone from one run at each cap. Later, the twelve XMem fixtures passed on ext4 loop backing, direct Btrfs NOCOW backing, and a private NFS-backed scratch directory. A title run with only the temporary backing on NFS completed 105 post-upscale Presents and rendered more of the opening credits. Local NVMe utilization was near zero during its final render interval. The local host memory-pressure stop ended the run before a gameplay input check. Codex (GPT-6.2-Sol High) assisted with the builds and diagnostics.
Filip722 commented 2026-11-26 07:03:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-26T06:15:30Z.


The file-backed XMem implementation from 951dc00 also worked in a combined Series S test on Bazzite 44 with an RTX 5060 Laptop GPU (615.78.08) and GE-Proton 11-14. With temporary files on NFS, the opening made 396 post-upscale Presents, created a normal offline save, and a separate process resumed from that save into the first prison room. I verified opposite camera movement across completed frames after Gamescope had selected the game window. The room is still generally below 1 fps on this laptop.

This tests compatibility of file backing in a combined build. It does not isolate a frame-rate benefit from the backing change. OpenAI Codex (GPT-6.2-Sol High) assisted with the port and test.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7184249195 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7184249195). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-26T06:15:30Z. --- The file-backed XMem implementation from `951dc00` also worked in a combined Series S test on Bazzite 44 with an RTX 5060 Laptop GPU (615.78.08) and GE-Proton 11-14. With temporary files on NFS, the opening made 396 post-upscale Presents, created a normal offline save, and a separate process resumed from that save into the first prison room. I verified opposite camera movement across completed frames after Gamescope had selected the game window. The room is still generally below 1 fps on this laptop. This tests compatibility of file backing in a combined build. It does not isolate a frame-rate benefit from the backing change. OpenAI Codex (GPT-6.2-Sol High) assisted with the port and test.
Filip722 commented 2026-11-26 08:04:56 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-26T07:12:16Z.


The opt-in pagefile budget is now on this branch. It keeps the existing default of file backing for every section when a backing directory is configured. A budget of 256 MiB placed one 220 MiB section in the Wine pagefile while the other three stayed on the same NFS share.

On Bazzite 44 with GE-Proton11-14 and an RTX 5060 Laptop GPU (8 GB), a matching Series S checkpoint replay in the settled prison room completed 44 Presents in 54 seconds with mixed backing, versus 20 with all-file backing. The median interval decreased from 2.42 s to 0.81 s. Server write bytes on that mount fell from about 78 to 30 MiB per completed Present over the comparison windows. This is one run per arm, with the same checkpoint and stationary view. Play remains slow and the mixed run used more scope swap.

All 15 focused XMem tests passed with the budget off and on in the runtime comparison integration. The backing implementation and budget test in this follow-up match the tested code. Asset policy passed on the PR branch. Prepared and tested with Codex (GPT-6.2-Sol High) assistance.

After merging current main, the Windows launcher build and all 15 focused XMem tests passed on PR head b0c137d with each budget. The asset policy passed on that head too.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7185204663 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7185204663). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-26T07:12:16Z. --- The opt-in pagefile budget is now on this branch. It keeps the existing default of file backing for every section when a backing directory is configured. A budget of 256 MiB placed one 220 MiB section in the Wine pagefile while the other three stayed on the same NFS share. On Bazzite 44 with GE-Proton11-14 and an RTX 5060 Laptop GPU (8 GB), a matching Series S checkpoint replay in the settled prison room completed 44 Presents in 54 seconds with mixed backing, versus 20 with all-file backing. The median interval decreased from 2.42 s to 0.81 s. Server write bytes on that mount fell from about 78 to 30 MiB per completed Present over the comparison windows. This is one run per arm, with the same checkpoint and stationary view. Play remains slow and the mixed run used more scope swap. All 15 focused XMem tests passed with the budget off and on in the runtime comparison integration. The backing implementation and budget test in this follow-up match the tested code. Asset policy passed on the PR branch. Prepared and tested with Codex (GPT-6.2-Sol High) assistance. After merging current main, the Windows launcher build and all 15 focused XMem tests passed on PR head `b0c137d` with each budget. The asset policy passed on that head too.
Filip722 commented 2026-11-26 09:08:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-26T08:49:39Z.


I compared 256 and 448 MiB for VICTORY_PHYSICAL_PAGEFILE_FIRST_MB on an RTX 5060 Laptop GPU (8 GB), NVIDIA 615.78.08, Bazzite 44 and GE-Proton11-14 with vkd3d-proton cae8353ed7959c4+. Both Series S replays used the same local integration build, cloned checkpoint, renderer settings and starting memory limits. The launch switch was the only change. These title runs used the earlier integration of the backing code. The focused XMem results above are from the exact PR head.

Pagefile budget Sections on pagefile Presents in 54 s FPS Median / p95 Present interval Min. free VRAM Min. available host RAM
256 MiB 220 MiB 44 0.83 0.81 / 3.44 s 2,313 MiB 4,515 MiB
448 MiB 220 + 185 MiB 71 1.34 0.50 / 2.10 s 2,272 MiB 3,794 MiB

Both measurements start in the same settled prison-window view with no input. Over 53.2 s the mount's server write counters recorded 1,300 versus 1,066 MiB, about 29.6 versus 15.0 MiB per Present. The remaining file-backed sections still showed bursty writeback. This is one replay per setting. The higher opt-in budget gave better pacing in this sample and used more host RAM.

The 448 MiB replay also showed the guard objective and accepted movement through the cell door into the corridor and common room. The door sequence ran at about 0.96 FPS. This is a progression check on the integration build. A matched corridor run at 256 MiB is unavailable.

Codex (GPT-6.2-Sol High) assisted with replay setup, measurements and this report.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7187068524 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7187068524). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-26T08:49:39Z. --- I compared 256 and 448 MiB for `VICTORY_PHYSICAL_PAGEFILE_FIRST_MB` on an RTX 5060 Laptop GPU (8 GB), NVIDIA 615.78.08, Bazzite 44 and GE-Proton11-14 with vkd3d-proton `cae8353ed7959c4+`. Both Series S replays used the same local integration build, cloned checkpoint, renderer settings and starting memory limits. The launch switch was the only change. These title runs used the earlier integration of the backing code. The focused XMem results above are from the exact PR head. | Pagefile budget | Sections on pagefile | Presents in 54 s | FPS | Median / p95 Present interval | Min. free VRAM | Min. available host RAM | | --- | --- | ---: | ---: | ---: | ---: | ---: | | 256 MiB | 220 MiB | 44 | 0.83 | 0.81 / 3.44 s | 2,313 MiB | 4,515 MiB | | 448 MiB | 220 + 185 MiB | 71 | 1.34 | 0.50 / 2.10 s | 2,272 MiB | 3,794 MiB | Both measurements start in the same settled prison-window view with no input. Over 53.2 s the mount's server write counters recorded 1,300 versus 1,066 MiB, about 29.6 versus 15.0 MiB per Present. The remaining file-backed sections still showed bursty writeback. This is one replay per setting. The higher opt-in budget gave better pacing in this sample and used more host RAM. The 448 MiB replay also showed the guard objective and accepted movement through the cell door into the corridor and common room. The door sequence ran at about 0.96 FPS. This is a progression check on the integration build. A matched corridor run at 256 MiB is unavailable. Codex (GPT-6.2-Sol High) assisted with replay setup, measurements and this report.
Filip722 commented 2026-11-27 12:10:14 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T12:10:14Z.


Follow-up on local NVMe with the same opt-in mixed backing port in another renderer. The Windows MSVC XMem suite passed 22 cases in each mode on Bazzite 44 and GE-Proton11-14, with the benchmark ignored and no leftover test backing files. The mixed run used the 448 MiB pagefile-first allowance, and the GPU import option was off in both replays.

In the 75–85 second startup window from the same Series S checkpoint and empty cache seed, median available host RAM was 614 MiB with pagefile backing and 3,343 MiB with mixed backing. Peak title scope swap in that window was 2,898 versus 1,813 MiB. Median free VRAM was 2,899 versus 2,920 MiB on the RTX 5060 Laptop GPU (8 GiB). The mixed run rendered the opening room with substantial visual artifacts and eventually stopped at the GPU memory cutoff with 608 MiB free. This comparison supports the host-memory result. The room captures and draw workload did not provide a qualified gameplay FPS comparison.

A second comparison on VI-BR-PORT 779b674 plus an independent adaptation of this change kept the same GE runtime, indexed wineserver, cache seed, Series S settings and 448 MiB pagefile-first allowance. All 18 focused XMem cases passed per backing mode with one benchmark ignored. At 90–105 s, median available RAM was 64 versus 2,811 MiB and median scope swap was 4,496 versus 2,136 MiB. The mixed replay then hit the desktop-response cutoff at 131 s during high NVMe activity. The pagefile replay reached the rendered cell and hit the VRAM cutoff at 228 s. The host-memory gain repeated, and the mixed run ended before a gameplay comparison.

Assisted by Codex (GPT-6.2-Sol High).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7217921213 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7217921213). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-27T12:10:14Z. --- Follow-up on local NVMe with the same opt-in mixed backing port in another renderer. The Windows MSVC XMem suite passed 22 cases in each mode on Bazzite 44 and GE-Proton11-14, with the benchmark ignored and no leftover test backing files. The mixed run used the 448 MiB pagefile-first allowance, and the GPU import option was off in both replays. In the 75–85 second startup window from the same Series S checkpoint and empty cache seed, median available host RAM was 614 MiB with pagefile backing and 3,343 MiB with mixed backing. Peak title scope swap in that window was 2,898 versus 1,813 MiB. Median free VRAM was 2,899 versus 2,920 MiB on the RTX 5060 Laptop GPU (8 GiB). The mixed run rendered the opening room with substantial visual artifacts and eventually stopped at the GPU memory cutoff with 608 MiB free. This comparison supports the host-memory result. The room captures and draw workload did not provide a qualified gameplay FPS comparison. A second comparison on VI-BR-PORT `779b674` plus an independent adaptation of this change kept the same GE runtime, indexed wineserver, cache seed, Series S settings and 448 MiB pagefile-first allowance. All 18 focused XMem cases passed per backing mode with one benchmark ignored. At 90–105 s, median available RAM was 64 versus 2,811 MiB and median scope swap was 4,496 versus 2,136 MiB. The mixed replay then hit the desktop-response cutoff at 131 s during high NVMe activity. The pagefile replay reached the rendered cell and hit the VRAM cutoff at 228 s. The host-memory gain repeated, and the mixed run ended before a gameplay comparison. Assisted by Codex (GPT-6.2-Sol High).
Filip722 commented 2026-11-27 16:23:57 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T16:23:57Z.


I adapted the optional file-backing path to the current NVIDIA-based XMem implementation in a private Series S test build. The same Windows MSVC binary passed the existing alias/map, consecutive-page and section-window fixtures in each backing mode under GE-Proton11-14.

The matched checkpoint replay compared default Wine pagefile sections with the same mixed backing policy using a 448 MiB initial pagefile budget. Over 55–75 seconds, median available host memory moved from 370 to 3,582 MiB, minimum from 109 to 3,174 MiB, and peak scoped swap from 2,547 to 1,067 MiB. The host used 16 GB RAM and the RTX 5060 Laptop 8 GB on Bazzite 44.

The file-backed replay was stopped by the desktop responsiveness monitor around 120 seconds, with 4,078 MiB host memory available and the NVMe saturated at the last samples. It did not reach the comparable rendered scene. This supports the startup headroom result on the rebased implementation. Playback throughput remains unmeasured.

Assisted by Codex (GPT-6.2-Sol High).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7223214567 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7223214567). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-27T16:23:57Z. --- I adapted the optional file-backing path to the current NVIDIA-based XMem implementation in a private Series S test build. The same Windows MSVC binary passed the existing alias/map, consecutive-page and section-window fixtures in each backing mode under GE-Proton11-14. The matched checkpoint replay compared default Wine pagefile sections with the same mixed backing policy using a 448 MiB initial pagefile budget. Over 55–75 seconds, median available host memory moved from 370 to 3,582 MiB, minimum from 109 to 3,174 MiB, and peak scoped swap from 2,547 to 1,067 MiB. The host used 16 GB RAM and the RTX 5060 Laptop 8 GB on Bazzite 44. The file-backed replay was stopped by the desktop responsiveness monitor around 120 seconds, with 4,078 MiB host memory available and the NVMe saturated at the last samples. It did not reach the comparable rendered scene. This supports the startup headroom result on the rebased implementation. Playback throughput remains unmeasured. Assisted by Codex (GPT-6.2-Sol High).
ArturoWolff commented 2026-11-27 21:05:21 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ArturoWolff on 2026-11-27T21:05:21Z.


Independent retest of the optional physical backing after the NVIDIA-based rebase, on a desktop RTX 4060 8 GB / 16 GB RAM.

I adapted Filip722's #830 at b0c137d8dee0e56eb852cf3a0f59bc691a4d0452 to receiver main 2eade68cade9b2f8cd2511cc97328e83f58508c3. The adaptation changes only the physical section creation path, its two dependencies and the existing donor budget test; the receiver's section window, commit tracking, page table and GPU registration remain unchanged. Same release Windows MSVC executable for both actual title runs (Rust 1.98.1, cargo-xwin, locked build; local patch SHA-256 34995dad40ba464c15c3ab440e5a7132a80a22af7003c1420ee3f90fe6f506ff).

Linux, NVIDIA 620.73.04, GE-Proton11-14 / vkd3d-proton 3.2.0 cae8353ed7959c4+, Series X, 1080p scene setting / 1440p internal presentation, actual 1920x1080 fullscreen client, ray-tracing builder and water light on, no explicit omitted passes. Separate clones of the same retired onboarding prefix, fresh external driver-cache dirs, same 512 MiB host guard, 210 s maximum. Default backing first, then private local NVMe Btrfs NOCOW temporary files with VICTORY_PHYSICAL_PAGEFILE_FIRST_MB=448. Both showed the same illustrated loading artwork (same character/car image), then black frames. Neither run captured a qualifying account-picker A press, so this is a startup/headroom comparison, not a perfectly synchronized guest-progress or gameplay FPS comparison. Initial host available memory was 10,713 vs 10,255 MiB.

Measured Wine default Mixed backing
Median host available, 55–75 s (39 samples each) 3,908 MiB 6,748 MiB
Median scope shmem, same window 2,924 MiB 75 MiB
Peak sampled scope RAM 9,267 MiB 9,087 MiB
Peak sampled scope swap 4,083 MiB 2,827 MiB
Minimum observed host available 458 MiB 2,546 MiB
End of run Host guard, 87.1 s Process exit 5, 114.8 s
New host OOM kills / kernel GPU fault events 0 / 0 0 / 0

The mixed arm logged two file-backed sections and one budgeted pagefile section (total file-backed logical size about 6.8 GiB); the dedicated backing directory was empty after process retirement. No physical allocation failure was logged. This agrees with your rebased comparison above: substantial startup headroom, but no demonstrated gameplay FPS or rendering improvement. The later exit 5 while ample host memory remained is a separate unresolved failure. Both arms still logged failed native pipeline-library creation, card compare compilation and indirect argument clamp creation; the relevant compatibility fixes are #885 and #1489, not part of this test. No assertion that any one of those warnings caused the later exit. No game assets, captures, raw memory or crash offsets attached. The existing focused tests were not rerun on this adaptation; this is actual guarded title execution evidence.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7228121949 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/830#issuecomment-7228121949). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-27T21:05:21Z. --- Independent retest of the optional physical backing after the NVIDIA-based rebase, on a desktop RTX 4060 8 GB / 16 GB RAM. I adapted Filip722's #830 at `b0c137d8dee0e56eb852cf3a0f59bc691a4d0452` to receiver main `2eade68cade9b2f8cd2511cc97328e83f58508c3`. The adaptation changes only the physical section creation path, its two dependencies and the existing donor budget test; the receiver's section window, commit tracking, page table and GPU registration remain unchanged. Same release Windows MSVC executable for both actual title runs (Rust 1.98.1, cargo-xwin, locked build; local patch SHA-256 `34995dad40ba464c15c3ab440e5a7132a80a22af7003c1420ee3f90fe6f506ff`). Linux, NVIDIA 620.73.04, GE-Proton11-14 / vkd3d-proton 3.2.0 `cae8353ed7959c4+`, Series X, 1080p scene setting / 1440p internal presentation, actual 1920x1080 fullscreen client, ray-tracing builder and water light on, no explicit omitted passes. Separate clones of the same retired onboarding prefix, fresh external driver-cache dirs, same 512 MiB host guard, 210 s maximum. Default backing first, then private local NVMe Btrfs NOCOW temporary files with `VICTORY_PHYSICAL_PAGEFILE_FIRST_MB=448`. Both showed the same illustrated loading artwork (same character/car image), then black frames. Neither run captured a qualifying account-picker A press, so this is a startup/headroom comparison, not a perfectly synchronized guest-progress or gameplay FPS comparison. Initial host available memory was 10,713 vs 10,255 MiB. | Measured | Wine default | Mixed backing | |---|---:|---:| | Median host available, 55–75 s (39 samples each) | 3,908 MiB | 6,748 MiB | | Median scope shmem, same window | 2,924 MiB | 75 MiB | | Peak sampled scope RAM | 9,267 MiB | 9,087 MiB | | Peak sampled scope swap | 4,083 MiB | 2,827 MiB | | Minimum observed host available | 458 MiB | 2,546 MiB | | End of run | Host guard, 87.1 s | Process exit 5, 114.8 s | | New host OOM kills / kernel GPU fault events | 0 / 0 | 0 / 0 | The mixed arm logged two file-backed sections and one budgeted pagefile section (total file-backed logical size about 6.8 GiB); the dedicated backing directory was empty after process retirement. No physical allocation failure was logged. This agrees with your rebased comparison above: substantial startup headroom, but no demonstrated gameplay FPS or rendering improvement. The later exit 5 while ample host memory remained is a separate unresolved failure. Both arms still logged failed native pipeline-library creation, card compare compilation and indirect argument clamp creation; the relevant compatibility fixes are #885 and #1489, not part of this test. No assertion that any one of those warnings caused the later exit. No game assets, captures, raw memory or crash offsets attached. The existing focused tests were not rerun on this adaptation; this is actual guarded title execution evidence. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
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/830:upstream-pr/830'
git switch 'upstream-pr/830'

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/830'
git switch 'upstream-pr/830'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/830'
git switch 'upstream-pr/830'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/830'
git switch 'main'
git merge --squash 'upstream-pr/830'
git switch 'main'
git merge --ff-only 'upstream-pr/830'
git switch 'main'
git merge 'upstream-pr/830'
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
fxceless/victory-fork!829
No description provided.