Repository navigation
xmem: commit physical-page sections whole under Wine - #53
Merged
Merged
Conversation
XMemAllocatePhysicalPages makes SEC_RESERVE sections and commits their pages one view at a time. Under Wine each commit is a wineserver request that scans every range committed so far, so wineserver ran at full load while the title's threads waited on it, and loading hardly moved. Under Wine (detected by ntdll's wine_get_version export) the sections are now SEC_COMMIT and the per-view commit is skipped. Wine backs a committed section with a sparse file, so untouched pages still cost nothing. Windows keeps SEC_RESERVE, since a busy host may be unable to commit the 6.1 GiB the title asks for in one go. Tested: Linux (Wine 11.21), i7-12700K, RTX 4070. wineserver load drops after the first seconds and the title gets to its loading screen, drawing and dispatching.
|
Tested
AI-assisted (DeepSeek V4.1 Flash coding agent). |
a55uka
force-pushed
the
fix/wine-physical-pages
branch
from
November 24, 2026 00:10
2fec09c to
78b8404
Compare
10 tasks done
brcly
pushed a commit
to brcly/TuxBox
that referenced
this pull request
Nov 24, 2026
Each XMem physical-page batch is a SEC_RESERVE section whose views were committed one at a time. Under Wine every such commit is a wineserver request that scans all ranges committed so far, so a title that maps many physical pages keeps wineserver busy and its threads wait on it. Commit the whole section once through a temporary view when it is created. If that fails (e.g. at the commit limit), views fall back to committing their own range as before. Idea from Marvisak/VIctory#53 (reimplemented; no code copied). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
suirentakamura
referenced
this pull request
in suirentakamura/victory-suiren
Nov 24, 2026
xmem: commit physical-page sections whole under Wine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XMemAllocatePhysicalPagescreatesSEC_RESERVEsections and commits their pages one view at a time. Under Wine, each commit is a wineserver request that scans every range committed so far. wineserver ran at full load, the title's threads sat blocked on its pipe (req_add_mapping_committed_range/req_map_viewin gdb), and loading barely moved.Tested: