The streaming log's copies of page mappings (CopyPageMappingsBatchX ->
map_aliases) were counted twice with one mapping thread: once for the
batch and once more for each range in it (map_alias), so their calls and
milliseconds (254,000 calls, 70.3 s in run x1440-streamlog) were up to
twice what they were. A batch is now one call; map_alias called alone
still counts.
The log's M line has two more fields at its end: pages the copies mapped,
and how many of them show the section page after the one the page before
them shows, i.e. what one view could show with it.
VICTORY_MAP_RUNS=1 (off by default) maps such a run through one view: 2
system calls where a view a page took 2n (unmapping is the dearest call,
about 110 us a view in a cutscene). A run gets one view where its
addresses are one placeholder: the hole one view left, holes of views of
ours side by side that cover it exactly (joined into one with
MEM_COALESCE_PLACEHOLDERS), or memory with no hole of ours in it (cut out
of the title's reservation; if that fails, nothing is changed). Anything
else goes a page at a time, as before. A copy whose source is mapped onto
itself is looked up page by page as it changes, as before, and the pages
before a source page that is not mapped are mapped all the same.
Co-Authored-By: Claude Opus 5.5 <[email protected]>