perf(hle): split large xmem physical-page pools into 64 MiB sections #418

Manually merged
github merged 3 commits from github-bot/gh-418 into gh-pr/418/base 2026-12-04 03:47:52 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-04 02:32 UTC · original
Androtim:perf/xmem-sections-indirect-clamp-lockfree-f3 → main · +537 −53 · 1 files · 3 commits · merged 2026-12-04 03:47 UTC

Summary

Wave 6B port of verified \GPL-3.0\ upstream wins:

  1. Ported: \ReTerryDavis/ReVIctory\ PR #3\ (\7f2fcea, GPL-3.0) — \crates/victory-hle/src/modules/xmem.rs\
    • Splits large physical-page allocations (> 256 MiB) into \64 MiB\ host pagefile-backed sections (\VICTORY_SECTION_MB, default \64; \
**@⁠Androtim** on GitHub · 2026-12-04 02:32 UTC · [original](https://github.com/Androtim/MiniVI/pull/418) `Androtim:perf/xmem-sections-indirect-clamp-lockfree-f3` → `main` · +537 −53 · 1 files · 3 commits · merged 2026-12-04 03:47 UTC ## Summary Wave 6B port of verified \GPL-3.0\ upstream wins: 1. **Ported: \ReTerryDavis/ReVIctory\ PR \#3\ (\7f2fcea\, GPL-3.0)** — \crates/victory-hle/src/modules/xmem.rs\ - Splits large physical-page allocations (\> 256 MiB\) into \64 MiB\ host pagefile-backed sections (\VICTORY_SECTION_MB\, default \64\; \
Port ReTerryDavis/ReVIctory PR #3 (7f2fcea, GPL-3.0) to crates/victory-hle/src/modules/xmem.rs:
- Split physical-page allocations larger than 256 MiB into 64 MiB host sections (VICTORY_SECTION_MB, default 64, 0 disables) so Windows does not stall MapViewOfFile3/UnmapViewOfFile2 behind MiTrimSection walks across ~100k single-page views of one multi-gigabyte section, and can reclaim unused 64 MiB regions independently.
- Keep allocations <= 256 MiB (including the 185 MiB 32-bit graphics heap) and Wine allocations in a single section.
- Preserve consecutive page numbers, table.take(n) page-number reuse, TITLE_PAGES accounting, and PR #414 unmap hooks.
- Add unit tests for section length splitting, 185 MiB single-section invariant, and cross-section mapping/aliasing.

Verified remaining Wave 6B items already satisfied in MiniVI:
- ReTerryDavis/ReVIctory 1183468 (indirect clamp on every GPU): MiniVI never added the AMD indirect_clamp_skip bypass and already clamps indirect arguments unconditionally on every GPU.
- TrustNo1/Darner 6dd1ad3 (lock-free atomic F3 stats): streamline::shown_per_frame() and fsr::shown_per_frame() already read lock-free atomics (FG_PER, SWAP_CHAIN, ON) without taking a mutex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 02:37:06 +00:00
github-bot force-pushed github-bot/gh-418 from e17b33ab3a to a6e81eb174 2026-12-04 02:48:18 +00:00 Compare
Author
Owner

@⁠Androtim on GitHub · 2026-12-04 03:02 UTC · original

Triage (a6e81eb1, CI check PASS):

  • Clean, 100% title-neutral single-file port of ReVIctory #3 (+422/-44 in crates/victory-hle/src/modules/xmem.rs, zero opt-in toggles — VICTORY_SECTION_MB defaults to 64 with =0 kill-switch): splits > 256 MiB physical-page pools into 64 MiB host sections to bound Windows per-section view-list lock contention and allow freed pages to return to Windows commit.
  • Holding auto-merge for Gate 2 Audit (#282) (specifically verifying the 185 MiB 32-bit heap stays a single section, cross-section boundary map/unmap/alias splits, and zero handle leaks) + Gate 3 live plain---release 1440p/4K GPU A/B.
**@⁠Androtim** on GitHub · 2026-12-04 03:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/418#issuecomment-7399624284) Triage (`a6e81eb1`, **CI `check` PASS**): - Clean, 100% title-neutral single-file port of `ReVIctory` `#3` (`+422/-44` in `crates/victory-hle/src/modules/xmem.rs`, **zero opt-in toggles** — `VICTORY_SECTION_MB` defaults to `64` with `=0` kill-switch): splits `> 256 MiB` physical-page pools into `64 MiB` host sections to bound Windows per-section view-list lock contention and allow freed pages to return to Windows commit. - Holding auto-merge for **Gate 2 Audit (`#282`)** (specifically verifying the 185 MiB 32-bit heap stays a single section, cross-section boundary map/unmap/alias splits, and zero handle leaks) + **Gate 3 live plain-`--release` 1440p/4K GPU A/B**.
github-bot force-pushed github-bot/gh-418 from b689a095b4 to b08e259704 2026-12-04 03:26:18 +00:00 Compare
github-bot force-pushed github-bot/gh-418 from b08e259704 to 383b5ae850 2026-12-04 03:37:04 +00:00 Compare
github-bot changed target branch from main to gh-pr/418/base 2026-12-04 03:47:49 +00:00
github manually merged commit 383b5ae850 into gh-pr/418/base 2026-12-04 03:47:52 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!418
No description provided.