Remap cost on Wine: 0.3-0.7 s/s in unmap/map, the 'already showing' skip fires 0 times #1111

Open
opened 2026-11-26 03:57:40 +00:00 by github-bot · 0 comments
Owner

@⁠YaBulochka on GitHub · 2026-11-25 19:49 UTC · original

Remapping title memory costs 0.3-0.7 s per second on Wine, and the "already showing" skip never fires here

Numbers from a run of the retail package, in case they are useful for the lock work JoshuuDev's memory-gap is doing (that tree cannot be merged into ours: watch.rs turns Remapping into a Vec of guards and adds title_memory_reading_range/title_memory_remapping_range, plus five hunks in xmem.rs).

Setup: main d510ee4 + #1052 + #1011 + #1010 + #1054, plus JoshuuDev's diagnostics commit e5e06c4 and a local re-implementation of "pages already showing what is asked are left alone". CachyOS 7.3.5, Ryzen 5 9600X, 30 GB, RX 7600 XT 8 GB, RADV (Mesa 27.0.0), Wine 11.22, vkd3d-proton from master, VICTORY_TEXTURE_BUDGET_MB=4096.

Counter, unchanged from their log line:

remapping work per second over 5 s: 1082 unmaps 266.1 ms, 669 kernel maps 419.6 ms,
10.1 ms of our bookkeeping after them; 0 pages left as they were (already showing what is asked)
  • 0 of ~1,700 remaps a second ask for a page already shown: on this title every address really does point somewhere else each time, so the skip buys nothing here.
  • The cost is the unmap/map pair itself: 0.3-0.7 s per second of wall time, which is a large share of the 1.8-3.4 s "preparing" in the same frames.
  • Frames 2.3-6.0 s, copies 133-174 MB and 30-46 MB copied back per frame; GPU only 24-60 ms of that.

What I would try next, if you take it: the 16 MB lock split and the 64-address scatter from that branch. Is the 16 MB granularity tied to the mapping granularity the title uses, or could it be tuned for a small card? And is there a cheap way to tell "this remap is the same page set in a different order" from "a different set", since the plain equality check fires zero times?

No game files, dumps or screenshots are included.

**@⁠YaBulochka** on GitHub · 2026-11-25 19:49 UTC · [original](https://github.com/fxceless/victory-fork/issues/1111) Remapping title memory costs 0.3-0.7 s per second on Wine, and the "already showing" skip never fires here Numbers from a run of the retail package, in case they are useful for the lock work JoshuuDev's `memory-gap` is doing (that tree cannot be merged into ours: `watch.rs` turns `Remapping` into a `Vec` of guards and adds `title_memory_reading_range`/`title_memory_remapping_range`, plus five hunks in `xmem.rs`). **Setup:** `main` `d510ee4` + #1052 + #1011 + #1010 + #1054, plus JoshuuDev's diagnostics commit `e5e06c4` and a local re-implementation of "pages already showing what is asked are left alone". CachyOS 7.3.5, Ryzen 5 9600X, 30 GB, RX 7600 XT 8 GB, RADV (Mesa 27.0.0), Wine 11.22, vkd3d-proton from master, `VICTORY_TEXTURE_BUDGET_MB=4096`. **Counter, unchanged from their log line:** ``` remapping work per second over 5 s: 1082 unmaps 266.1 ms, 669 kernel maps 419.6 ms, 10.1 ms of our bookkeeping after them; 0 pages left as they were (already showing what is asked) ``` - 0 of ~1,700 remaps a second ask for a page already shown: on this title every address really does point somewhere else each time, so the skip buys nothing here. - The cost is the unmap/map pair itself: 0.3-0.7 s per second of wall time, which is a large share of the 1.8-3.4 s "preparing" in the same frames. - Frames 2.3-6.0 s, copies 133-174 MB and 30-46 MB copied back per frame; GPU only 24-60 ms of that. **What I would try next, if you take it:** the 16 MB lock split and the 64-address scatter from that branch. Is the 16 MB granularity tied to the mapping granularity the title uses, or could it be tuned for a small card? And is there a cheap way to tell "this remap is the same page set in a different order" from "a different set", since the plain equality check fires zero times? No game files, dumps or screenshots are included.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:40 +00:00
This discussion has been locked. Commenting is limited to contributors.
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/fxceless--victory-fork#1111
No description provided.