Physical page allocations come from sections of up to 2 MiB (VICTORY_SECTION_MB, off by default; #1089) #1271

Open
CuteBooty wants to merge 2 commits from upstream-pr/1274 into main
CuteBooty commented 2026-11-26 09:08:22 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by CuteBooty on 2026-11-26T09:08:22Z.


At 46bf5351, each physical-page request creates one Windows section. Fork run 307 measured 45 ms per usual frame and 197 ms per streaming frame in remapping, mostly in the system's own calls; run 308 found no redundant mapping among 103,024 pages. This ports RyanCase94's idea and first patch from #1089: a request is backed by sections of at most 2 MiB, so a remap touches small sections.

Switch. VICTORY_SECTION_MB=2 turns it on. Unset or 0 keeps one section per request, as now. It is off by default here on purpose: with it on, a large request has several section handles, which matters to code that opens a whole allocation as one heap, and it has not been run under Wine. In my own tree it has been on by default for about fifteen runs.

Measured (my tree, not this tip: Ryzen 5 3600, RTX 3070 8 GB, Windows 11, Series S; 5-second log lines):

one section per request sections of up to 2 MiB
texture refresh waiting on the title's remaps, per frame 37 ms on average about 1 ms
worst single wait 816 ms 28 ms and 62 ms (two runs)
samples over 20 ms 68 of 228 1 of 314 and 1 of 331

The lower waits held in every run since. Frame time itself did not get shorter. In play, the half-second freezes while driving were gone.

What changed. xmem.rs: XMemAllocatePhysicalPages and Section::drop (the cap and the cleanup). inplace.rs: title_memory_section, title_memory_section_closed, write_own, census_of track individual sections. One test checks page numbering and a two-byte write across the 2 MiB boundary, with the switch off and on.

State. Ported by hand onto this tip. cargo clippy --workspace --all-targets -- -D warnings is clean, cargo test --workspace passes (617), the asset policy passes. Not yet run in the game on this tip; the numbers above are from my tree (CuteBooty/victory-8gb), where the same change is VICTORY_SECTION_MB, default 2.

Credit: RyanCase94 (#1089) for the idea and the first patch.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:5507123775 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-26T09:08:22Z. --- At `46bf5351`, each physical-page request creates one Windows section. Fork run 307 measured 45 ms per usual frame and 197 ms per streaming frame in remapping, mostly in the system's own calls; run 308 found no redundant mapping among 103,024 pages. This ports RyanCase94's idea and first patch from #1089: a request is backed by sections of at most 2 MiB, so a remap touches small sections. **Switch.** `VICTORY_SECTION_MB=2` turns it on. Unset or `0` keeps one section per request, as now. It is **off by default** here on purpose: with it on, a large request has several section handles, which matters to code that opens a whole allocation as one heap, and it has not been run under Wine. In my own tree it has been on by default for about fifteen runs. **Measured** (my tree, not this tip: Ryzen 5 3600, RTX 3070 8 GB, Windows 11, Series S; 5-second log lines): | | one section per request | sections of up to 2 MiB | |---|---|---| | texture refresh waiting on the title's remaps, per frame | 37 ms on average | about 1 ms | | worst single wait | 816 ms | 28 ms and 62 ms (two runs) | | samples over 20 ms | 68 of 228 | 1 of 314 and 1 of 331 | The lower waits held in every run since. Frame time itself did not get shorter. In play, the half-second freezes while driving were gone. **What changed.** `xmem.rs`: `XMemAllocatePhysicalPages` and `Section::drop` (the cap and the cleanup). `inplace.rs`: `title_memory_section`, `title_memory_section_closed`, `write_own`, `census_of` track individual sections. One test checks page numbering and a two-byte write across the 2 MiB boundary, with the switch off and on. **State.** Ported by hand onto this tip. `cargo clippy --workspace --all-targets -- -D warnings` is clean, `cargo test --workspace` passes (617), the asset policy passes. **Not yet run in the game on this tip**; the numbers above are from my tree (CuteBooty/victory-8gb), where the same change is `VICTORY_SECTION_MB`, default 2. Credit: RyanCase94 (#1089) for the idea and the first patch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
HLVM04 commented 2026-11-26 10:06:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HLVM04 on 2026-11-26T09:26:27Z.


An in-game data point on NVIDIA for the same idea, though not this PR's port: we applied the original 2 MiB section patch from #1089 alone on our fork-based stack (RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, Windows 11 build 26200, Series S).

  • p90 frame time 105 ms, against about 118 ms before. Median 73 ms.
  • Copy-back 18 ms a frame. No crash or device loss.

Like your 3070 table, the clear change was in the long frames. This is from a few runs, so scene variance is possible, and it was on Windows only.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7187991813 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7187991813). Originally posted by [HLVM04](https://github.com/HLVM04) on 2026-11-26T09:26:27Z. --- An in-game data point on NVIDIA for the same idea, though not this PR's port: we applied the original 2 MiB section patch from #1089 alone on our fork-based stack (RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, Windows 11 build 26200, Series S). - p90 frame time 105 ms, against about 118 ms before. Median 73 ms. - Copy-back 18 ms a frame. No crash or device loss. Like your 3070 table, the clear change was in the long frames. This is from a few runs, so scene variance is possible, and it was on Windows only.
Garu667 commented 2026-11-26 10:06:47 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Garu667 on 2026-11-26T09:38:56Z.


Data point from an RTX 3080 10 GB (Series X, f6a09d3 + this PR, merged with no conflict), same route twice (boat mission, 30 s standing then ~3 min driving), README set + CARD_SYNC_BATCH=1 CARD_HASH_WIDE=1:

SECTION_MB unset SECTION_MB=2
remapping time (frame log, mean per frame) 42.8 ms 5.0 ms
world fps, median 8.5 8.4
5 s windows whose longest frame > 0.5 s / > 1 s 22 / 10 of 86 18 / 11 of 86
worst frame 3.6 s 3.7 s

So the remapping cost drops about 8x here too, but on this tree and card the long freezes while driving stay: the texture refresh's "waiting for title memory to hold still" reads 0 ms with or without the switch, and VICTORY_FRAME_WHY2 (#1275) shows the submit worker idle through the longest frames, so they come from somewhere else. No device loss, picture unchanged. One run each.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7188277116 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7188277116). Originally posted by [Garu667](https://github.com/Garu667) on 2026-11-26T09:38:56Z. --- Data point from an RTX 3080 10 GB (Series X, `f6a09d3` + this PR, merged with no conflict), same route twice (boat mission, 30 s standing then ~3 min driving), README set + `CARD_SYNC_BATCH=1 CARD_HASH_WIDE=1`: | | `SECTION_MB` unset | `SECTION_MB=2` | |---|---|---| | remapping time (frame log, mean per frame) | 42.8 ms | **5.0 ms** | | world fps, median | 8.5 | 8.4 | | 5 s windows whose longest frame > 0.5 s / > 1 s | 22 / 10 of 86 | 18 / 11 of 86 | | worst frame | 3.6 s | 3.7 s | So the remapping cost drops about 8x here too, but on this tree and card the long freezes while driving stay: the texture refresh's "waiting for title memory to hold still" reads 0 ms with or without the switch, and `VICTORY_FRAME_WHY2` (#1275) shows the submit worker idle through the longest frames, so they come from somewhere else. No device loss, picture unchanged. One run each.
CuteBooty commented 2026-11-26 11:05:31 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by CuteBooty on 2026-11-26T10:17:39Z.


Thank you both for running it, and on the fork's own code, which I had not done.

It is the same shape as on the 3070: the remapping cost drops by a large factor and the frame rate by itself does not move. What went away here were the 0.3-0.8 s stalls while driving, which on my tree were the texture refresh waiting for the title's remaps; on a tree where that wait already reads 0 ms, as in the RTX 3080 run, there is nothing for it to remove, and the long frames there have another cause. I would leave the switch off by default as proposed.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7189172208 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7189172208). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-26T10:17:39Z. --- Thank you both for running it, and on the fork's own code, which I had not done. It is the same shape as on the 3070: the remapping cost drops by a large factor and the frame rate by itself does not move. What went away here were the 0.3-0.8 s stalls while driving, which on my tree were the texture refresh waiting for the title's remaps; on a tree where that wait already reads 0 ms, as in the RTX 3080 run, there is nothing for it to remove, and the long frames there have another cause. I would leave the switch off by default as proposed.
KainanP commented 2026-11-26 12:07:19 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by KainanP on 2026-11-26T11:23:36Z.


A synthetic reproduction of #1089's stall, without the game. It shows the same effect, and it can be rerun on any machine.

The method is what the title does to its physical pages. A 4 GiB pagefile-backed section (SEC_RESERVE) is mapped one 64 KiB view per page into placeholders, the views are committed, and every page is touched. Then, for 10 s, a random page is remapped at a random address (unmap, MapViewOfFile3 into the placeholder, commit). A second thread meanwhile makes, touches and frees 2 GiB, the kind of memory churn that wakes the large-page rebuild worker. The run alternates one section with 2 MiB sections over 5 rounds in one process.

i7-14650HX, 32 GB, Windows 11 26200, release build, median of 5 rounds, going through VIctory's own XMemAllocatePhysicalPages / XMemMapPhysicalPages:

remaps/s median call p99 call calls of 1 ms or more
one section per request 6,644 16.3 µs 4,093 µs 1,386 (8.6 s of 10 s)
2 MiB sections 50,607 14.4 µs 36.8 µs 28 (1.0 s)
  • Raw Windows calls: a standalone version with no VIctory code gives the same picture. In 15 s, one section had 1,784 calls of 1 ms or more against 45 with 2 MiB sections.
  • What triggers it: a thread that only empties the working set (K32EmptyWorkingSet, no allocations) produces no stall in either mode. The trigger is memory being made and freed elsewhere, which a streaming title does all the time.
  • Without that churn: 2 MiB sections are about 8 % slower per remap (10.0 µs against 9.1 µs median). That is a small fixed price against stalls of up to 30 ms per call.
  • One round of five: the worker did not run in one round, and then both modes measured the same. So a single in-game run can miss the effect, which fits the runs above where only some frames changed.

The same change with the benchmark is up for upstream as Marvisak/VIctory#3177 (on by default there, since main has no in-place heap census), and for AnyXboxX as LooperSalty/AnyXboxX#352 (off by default, like here). For this PR, @CuteBooty: the benchmark is a self-contained #[ignore] test in xmem.rs (physical_remap_bench) and should port as is, if you want the numbers reproducible here.

AI use: Claude Code (Claude Opus 5.5) wrote the benchmark and ran it on my machine. No game files or game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7190667199 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7190667199). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-26T11:23:36Z. --- **A synthetic reproduction of #1089's stall, without the game.** It shows the same effect, and it can be rerun on any machine. The method is what the title does to its physical pages. A 4 GiB pagefile-backed section (`SEC_RESERVE`) is mapped one 64 KiB view per page into placeholders, the views are committed, and every page is touched. Then, for 10 s, a random page is remapped at a random address (unmap, `MapViewOfFile3` into the placeholder, commit). A second thread meanwhile makes, touches and frees 2 GiB, the kind of memory churn that wakes the large-page rebuild worker. The run alternates one section with 2 MiB sections over 5 rounds in one process. i7-14650HX, 32 GB, Windows 11 26200, release build, median of 5 rounds, going through VIctory's own `XMemAllocatePhysicalPages` / `XMemMapPhysicalPages`: | | remaps/s | median call | p99 call | calls of 1 ms or more | |---|---:|---:|---:|---:| | one section per request | 6,644 | 16.3 µs | 4,093 µs | 1,386 (8.6 s of 10 s) | | 2 MiB sections | 50,607 | 14.4 µs | 36.8 µs | 28 (1.0 s) | - **Raw Windows calls:** a standalone version with no VIctory code gives the same picture. In 15 s, one section had 1,784 calls of 1 ms or more against 45 with 2 MiB sections. - **What triggers it:** a thread that only empties the working set (`K32EmptyWorkingSet`, no allocations) produces no stall in either mode. The trigger is memory being made and freed elsewhere, which a streaming title does all the time. - **Without that churn:** 2 MiB sections are about 8 % slower per remap (10.0 µs against 9.1 µs median). That is a small fixed price against stalls of up to 30 ms per call. - **One round of five:** the worker did not run in one round, and then both modes measured the same. So a single in-game run can miss the effect, which fits the runs above where only some frames changed. The same change with the benchmark is up for upstream as Marvisak/VIctory#3177 (on by default there, since main has no in-place heap census), and for AnyXboxX as LooperSalty/AnyXboxX#352 (off by default, like here). For this PR, @CuteBooty: the benchmark is a self-contained `#[ignore]` test in `xmem.rs` (`physical_remap_bench`) and should port as is, if you want the numbers reproducible here. _AI use: Claude Code (Claude Opus 5.5) wrote the benchmark and ran it on my machine. No game files or game data._
CuteBooty commented 2026-11-26 14:03:31 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by CuteBooty on 2026-11-26T13:50:21Z.


@KainanP thank you for the benchmark. I have ported the test to this branch (99cd7e1b), credited to you with the reference to Marvisak/VIctory PR 3177, adapted to VICTORY_SECTION_MB: it picks one section or 2 MiB sections per run through a test-only override, so the switch's value does not matter. It is #[ignore]d (4 GiB mapped, about 90 s, roughly 6 GiB of memory at the peak):

cargo test --release -p victory-hle physical_remap_bench -- --ignored --nocapture

One change from yours: a drop guard stops the pressure thread, so a failed assertion in the timed loop cannot leave the test hanging.

One run here (Ryzen 5 3600, 32 GB, Windows 11; the machine was not quiet, so read it as shape, not as numbers):

sections remaps/s median p99 calls of 1 ms or more
one 4,410 17.4 us 2,600 us 4,995 (8,960 ms of 10 s)
2 MiB 60,526 13.0 us 24.9 us 40 (726 ms)

Medians of 3 rounds. In one of the three rounds the one-section case was as fast as the 2 MiB one, so the stall comes and goes, as it does in the game.

AI-assisted (Claude Code).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7193907555 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7193907555). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-26T13:50:21Z. --- @KainanP thank you for the benchmark. I have ported the test to this branch (`99cd7e1b`), credited to you with the reference to Marvisak/VIctory PR 3177, adapted to `VICTORY_SECTION_MB`: it picks one section or 2 MiB sections per run through a test-only override, so the switch's value does not matter. It is `#[ignore]`d (4 GiB mapped, about 90 s, roughly 6 GiB of memory at the peak): ``` cargo test --release -p victory-hle physical_remap_bench -- --ignored --nocapture ``` One change from yours: a drop guard stops the pressure thread, so a failed assertion in the timed loop cannot leave the test hanging. One run here (Ryzen 5 3600, 32 GB, Windows 11; the machine was not quiet, so read it as shape, not as numbers): | sections | remaps/s | median | p99 | calls of 1 ms or more | |---|---:|---:|---:|---:| | one | 4,410 | 17.4 us | 2,600 us | 4,995 (8,960 ms of 10 s) | | 2 MiB | 60,526 | 13.0 us | 24.9 us | 40 (726 ms) | Medians of 3 rounds. In one of the three rounds the one-section case was as fast as the 2 MiB one, so the stall comes and goes, as it does in the game. AI-assisted (Claude Code).
Proudnoob4 commented 2026-11-26 16:06:37 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Proudnoob4 on 2026-11-26T15:13:45Z.


RTX 4080 / i5-13600K (Win10) 10-minute verification — 66× smaller worst frame stall (7,408 ms -> 112 ms)!

Ported #1274 (VICTORY_SECTION_MB=2) onto our trustno1-coder/VIctory-NVIDIA-based branch (989e5c6, adapting inplace.rs so both Views::sections and Views::whole use BTreeMap and clean up in title_memory_section_gone) and ran both unit tests and a full 10-minute live GTA 6 prologue pass (--console series-s, render_scale=0.6667, RT skipped, warm shader cache):

  • Unit tests: physical_page_numbers_and_writes_continue_across_sections passed with VICTORY_SECTION_MB unset and =2.
  • 10-minute live streaming / stall comparison (same scene, same shader cache, n=104 / 105 settled frames):
    • Pass 15 (VICTORY_SECTION_MB=0): worst frame 7,408.4 ms, 6 frames >55 ms, 0.0 ms steady-state remap wait
    • Pass 16 (VICTORY_SECTION_MB=2): worst frame 112.4 ms (-98.5% / 66× reduction), 2 frames >55 ms (0 in tail-40), 0.0 ms remap wait
  • Visual check (t=140..600s): 0/230 black frames, 60/60 clean consecutive tail burst frames, full 4,582 draws/frame, zero crashes or handle leaks.

(Note: Pass 16 also had #1184 VICTORY_HOIST_CLAMPS=1 enabled in the same run, which shifted steady-state FPS from 32.00 to 30.70 due to list-splitting overhead on top of VICTORY_INDIRECT_BATCH=1; #1274 itself is a clear streaming/stall win and we're keeping VICTORY_SECTION_MB=2 enabled by default in our launcher.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7195968164 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7195968164). Originally posted by [Proudnoob4](https://github.com/Proudnoob4) on 2026-11-26T15:13:45Z. --- ### RTX 4080 / i5-13600K (Win10) 10-minute verification — **66× smaller worst frame stall (`7,408 ms -> 112 ms`)!** Ported `#1274` (`VICTORY_SECTION_MB=2`) onto our `trustno1-coder/VIctory-NVIDIA`-based branch (`989e5c6`, adapting `inplace.rs` so both `Views::sections` and `Views::whole` use `BTreeMap` and clean up in `title_memory_section_gone`) and ran both unit tests and a full 10-minute live GTA 6 prologue pass (`--console series-s`, `render_scale=0.6667`, RT skipped, warm shader cache): - **Unit tests:** `physical_page_numbers_and_writes_continue_across_sections` passed with `VICTORY_SECTION_MB` unset and `=2`. - **10-minute live streaming / stall comparison (same scene, same shader cache, `n=104` / `105` settled frames):** - **Pass 15 (`VICTORY_SECTION_MB=0`):** worst frame **`7,408.4 ms`**, **`6`** frames `>55 ms`, `0.0 ms` steady-state remap wait - **Pass 16 (`VICTORY_SECTION_MB=2`):** worst frame **`112.4 ms`** (**-98.5% / 66× reduction**), **`2`** frames `>55 ms` (`0` in tail-40), `0.0 ms` remap wait - **Visual check (`t=140..600s`):** `0/230` black frames, `60/60` clean consecutive tail burst frames, full `4,582` draws/frame, zero crashes or handle leaks. *(Note: Pass 16 also had `#1184` `VICTORY_HOIST_CLAMPS=1` enabled in the same run, which shifted steady-state FPS from `32.00` to `30.70` due to list-splitting overhead on top of `VICTORY_INDIRECT_BATCH=1`; `#1274` itself is a clear streaming/stall win and we're keeping `VICTORY_SECTION_MB=2` enabled by default in our launcher.)*
CuteBooty commented 2026-11-26 16:07:45 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by CuteBooty on 2026-11-26T16:07:45Z.


Summary of the confirmations so far: the remapping cost drops on every machine that tried it; the stalls go away where the remaps were their cause

@Proudnoob4 thank you for the 10-minute pass and for porting it to a different tree, and thanks again to everyone who ran it. Collected in one place, as reported by each tester (their trees and scenes differ, so the rows do not compare with each other):

Tester Machine Mode Without With VICTORY_SECTION_MB=2
here RTX 3070 8 GB, Ryzen 5 3600 Series S stalls of 0.3-0.8 s while driving gone
HLVM04 RTX 5070 Ti, 9800X3D Series S p90 frame about 118 ms 105 ms
Exopus-0x65f7ad0 RTX 5060 Ti 8 GB, 8700F, 16 GB RAM Series S 32-65 s of remapping in the opening cutscene 2.5 s
Garu667 RTX 3080 10 GB Series X remapping 42.8 ms a frame; long freezes 5.0 ms a frame; freezes unchanged
Proudnoob4 RTX 4080, i5-13600K, Windows 10 Series S worst frame 7,408 ms 112 ms
KainanP i7-14650HX, synthetic test, no game - 1,386 remaps of 1 ms or more in 10 s 28

What I read from it:

  • The remapping cost falls by a large factor everywhere, on Windows 10 and 11, on 8 to 16 GB cards, and in a test without the game.
  • The average frame rate does not move. What changes is the long frames, and only where the remaps caused them: on Garu667's tree the freezes have another cause and stay.
  • Known price: without memory churn elsewhere, 2 MiB sections are about 8 % slower per remap (KainanP: 10.0 against 9.1 µs median).
  • Nobody has reported a change in the picture, a crash or a device loss with it.

Limits, as the testers stated them: mostly one run each; Proudnoob4's pass with the switch also had VICTORY_HOIST_CLAMPS=1 on; the stall comes and goes between runs, so a single run can miss it in either direction.

On the default: I proposed leaving it off. With these reports I would be equally comfortable with it on by default if you prefer that, @fxceless; that is your call. The ignored benchmark on the branch (physical_remap_bench) lets anyone check a machine in about 90 seconds.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7197219587 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7197219587). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-26T16:07:45Z. --- **Summary of the confirmations so far: the remapping cost drops on every machine that tried it; the stalls go away where the remaps were their cause** @Proudnoob4 thank you for the 10-minute pass and for porting it to a different tree, and thanks again to everyone who ran it. Collected in one place, as reported by each tester (their trees and scenes differ, so the rows do not compare with each other): | Tester | Machine | Mode | Without | With `VICTORY_SECTION_MB=2` | |---|---|---|---|---| | here | RTX 3070 8 GB, Ryzen 5 3600 | Series S | stalls of 0.3-0.8 s while driving | gone | | HLVM04 | RTX 5070 Ti, 9800X3D | Series S | p90 frame about 118 ms | 105 ms | | Exopus-0x65f7ad0 | RTX 5060 Ti 8 GB, 8700F, 16 GB RAM | Series S | 32-65 s of remapping in the opening cutscene | 2.5 s | | Garu667 | RTX 3080 10 GB | Series X | remapping 42.8 ms a frame; long freezes | 5.0 ms a frame; freezes unchanged | | Proudnoob4 | RTX 4080, i5-13600K, Windows 10 | Series S | worst frame 7,408 ms | 112 ms | | KainanP | i7-14650HX, synthetic test, no game | - | 1,386 remaps of 1 ms or more in 10 s | 28 | What I read from it: - **The remapping cost falls by a large factor everywhere**, on Windows 10 and 11, on 8 to 16 GB cards, and in a test without the game. - **The average frame rate does not move.** What changes is the long frames, and only where the remaps caused them: on Garu667's tree the freezes have another cause and stay. - **Known price:** without memory churn elsewhere, 2 MiB sections are about 8 % slower per remap (KainanP: 10.0 against 9.1 µs median). - **Nobody has reported a change in the picture, a crash or a device loss with it.** Limits, as the testers stated them: mostly one run each; Proudnoob4's pass with the switch also had `VICTORY_HOIST_CLAMPS=1` on; the stall comes and goes between runs, so a single run can miss it in either direction. On the default: I proposed leaving it off. With these reports I would be equally comfortable with it on by default if you prefer that, @fxceless; that is your call. The ignored benchmark on the branch (`physical_remap_bench`) lets anyone check a machine in about 90 seconds.
LOCKhart07 commented 2026-11-27 12:09:09 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by LOCKhart07 on 2026-11-27T12:09:09Z.


RX 9070 XT / Ryzen 7 7800X3D / 32 GB (Win11), ~12-minute verification: remaps stay cheap, frames 10–20% faster at the same draw counts

Ported #1274 (VICTORY_SECTION_MB=2) onto a Belobug AMD-fork tree (cd8dfc0 + #252), with inplace.rs's Views::sections / Views::whole as BTreeMaps (looked up on every landing with VICTORY_STORE_BESIDE=1). Settings: Series S, VICTORY_UPSCALER=6, VICTORY_STORE_BESIDE=1, VICTORY_WIDE_SPIN=200, VICTORY_SIZE_OWN_HANDLE=1, VICTORY_LAND_ECHO=0; renderer ports off. Diagnostics build with VICTORY_DSTORAGE_LOG mapping costs. Compared with a run without the switch the same day, both driving and running through the city.

Log confirms: physical pages in sections of 32 pages.

one section 2 MiB sections
unmap per call, busy streaming seconds up to ~194 µs steady 11–12 µs
worst single mapping call 107 ms 66 ms
frame ms at 4–5k draws 52.7 46.8
frame ms at 5–6k draws 55.6 50.2
frame ms at 6–7k draws 72.6 58.5
frame ms at 7–8k draws 71.0 61.0

No errors and no new warning kinds; "texture changed after its upload" warnings came at the same rate (200 vs 178).

One thing to flag, not confirmed as caused by this: during the run I saw a vertex spike pulled down from a car's rear bumper. It looks like the stretched geometry already reported on this hardware without the switch (Belobug #355/#494), and the in-place path (beside/cover_in) refuses ranges that span sections, so I don't see a way for the split to cause it. I haven't done a switch-off run at the same spot yet.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7217900043 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1274#issuecomment-7217900043). Originally posted by [LOCKhart07](https://github.com/LOCKhart07) on 2026-11-27T12:09:09Z. --- ### RX 9070 XT / Ryzen 7 7800X3D / 32 GB (Win11), ~12-minute verification: remaps stay cheap, frames 10–20% faster at the same draw counts Ported #1274 (`VICTORY_SECTION_MB=2`) onto a Belobug AMD-fork tree (cd8dfc0 + #252), with `inplace.rs`'s `Views::sections` / `Views::whole` as `BTreeMap`s (looked up on every landing with `VICTORY_STORE_BESIDE=1`). Settings: Series S, `VICTORY_UPSCALER=6`, `VICTORY_STORE_BESIDE=1`, `VICTORY_WIDE_SPIN=200`, `VICTORY_SIZE_OWN_HANDLE=1`, `VICTORY_LAND_ECHO=0`; renderer ports off. Diagnostics build with `VICTORY_DSTORAGE_LOG` mapping costs. Compared with a run without the switch the same day, both driving and running through the city. Log confirms: `physical pages in sections of 32 pages`. | | one section | 2 MiB sections | |---|---|---| | unmap per call, busy streaming seconds | up to ~194 µs | steady 11–12 µs | | worst single mapping call | 107 ms | 66 ms | | frame ms at 4–5k draws | 52.7 | **46.8** | | frame ms at 5–6k draws | 55.6 | **50.2** | | frame ms at 6–7k draws | 72.6 | **58.5** | | frame ms at 7–8k draws | 71.0 | **61.0** | No errors and no new warning kinds; "texture changed after its upload" warnings came at the same rate (200 vs 178). One thing to flag, not confirmed as caused by this: during the run I saw a vertex spike pulled down from a car's rear bumper. It looks like the stretched geometry already reported on this hardware without the switch (Belobug #355/#494), and the in-place path (`beside`/`cover_in`) refuses ranges that span sections, so I don't see a way for the split to cause it. I haven't done a switch-off run at the same spot yet.
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/1274:upstream-pr/1274'
git switch 'upstream-pr/1274'

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/1274'
git switch 'upstream-pr/1274'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1274'
git switch 'upstream-pr/1274'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1274'
git switch 'main'
git merge --squash 'upstream-pr/1274'
git switch 'main'
git merge --ff-only 'upstream-pr/1274'
git switch 'main'
git merge 'upstream-pr/1274'
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!1271
No description provided.