Repository navigation
Conversation
XMemMapPhysicalPagesScatter takes each unmapped page home on its own: one VirtualAlloc, one VirtualQuery and, in a sparse window, one UpdateTileMappings and one Signal per 64 KiB page. A retail game unmaps 4136 and then 6720 pages in two calls while it loads, and the homes of each call are one run of neighbours: 2.7-3.2 s in those two calls, the larger part in the tile mappings. The parts of a call that only unmap (1024 pages, 64 MiB, at a time) now commit their homes ahead, a run of neighbouring pages per VirtualAlloc and per sparse::committed. Homes that are committed already, or cannot be, still go page by page, and a call that fails part way gives back the homes no page went to. The two calls take 0.4-0.5 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent verification on current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
Whole-suite NVIDIA run, to go with the Tested
Not tested
AI use
|
|
A run on Linux under Wine. Tested
Not tested
AI use
|
|
Independent Windows run on 3b54c24. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11.
A synthetic release fixture timed only
The batched path issued five and seven ahead-of-time commit ranges respectively. Both paths copied every page back and verified exact markers at the first and last word of each page across all 16 samples. Retail startup follow-up. I used one release binary built from main 568e7db with 3b54c24 applied and the same local guards and timing hooks in both arms. The control disabled only the ahead-of-time commits. Both runs started offline from separate copies of the same profile and cache seed, with no input. Each call completed successfully.
One startup run per arm, page-by-page first. The implicit driver cache was uncontrolled. Both calls happened after the first frame. The comparison measures time inside those calls and leaves whole-load time and frame pacing unverified. AI use: Codex (GPT-6, exact variant unspecified) wrote the scratch fixture and timing hook, ran the tests and drafted this report. |
XMemMapPhysicalPagesScattertakes each unmapped page home on its own: oneVirtualAlloc, oneVirtualQueryand, in a sparse window, oneUpdateTileMappings+Signalper 64 KiB page. A retail game unmaps 4136 and then 6720 pages in two calls while it loads, and the homes of each call are one run of neighbours. The parts of a call that only unmap now commit their homes ahead in runs.What is in it
kernelx.rs:commit_homes_ahead, for at most 1024 pages (64 MiB) at a time. Homes already committed go page by page as before; a call that fails part way gives back the homes no page went to. Mapping pages is unchanged.kernelx/lazy.rs:is_marked.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4: 741 passed, 3 failed, 41 ignored. The same 3 fail on clean main 47efa2e (738 passed, 3 failed, 41 ignored):placed_title_textures_share_vram_and_preserve_pixelsreads zero in a 3D mip (D3D12.X: map and unmap 3D texture mips separately #1028 describes it), andtransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memoryfind the mutex it poisoned. The test output had no SKIPPED lines, but captured output of passing tests is not shown.Regression run
main:
PR:
Not tested
XMemMapPhysicalPageswithout a page array, and scatters that map and unmap in one part, still go page by page.AI use