xmem: lazily reserve below-40 startup blocks and reclaim empty slabs #2762

Merged
triggered02 merged 1 commit from upstream-pr/2770 into main 2026-11-26 07:34:01 +00:00
triggered02 commented 2026-11-26 07:26:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-26T07:26:04Z.


Extends the opt-in lazy commit and physical-page slab paths so large < 2^40 startup pools stay reserved until touched and freed physical-page slabs return system commit to the OS. Refs #1199.

What changed

  • src/xmem_mapped_pages.cpp (commit_startup_block): removes && !below_40 from lazy and assigns block = keep_startup_block_below_40(...) instead of returning early, so 0x283 blocks >= 32 MiB when both X2W_XMEM_LAZY_STARTUP=1 and X2W_XMEM_STARTUP_BELOW_40=1 are set are placed below 2^40 as MEM_RESERVE and registered in lazy_blocks (committing 256 KiB chunks on first touch / x2w_xmem_commit_range, while preserving the < 2^40 validation and exhaustion refusal). Runs without X2W_XMEM_LAZY_STARTUP=1 are unchanged.
  • src/xmem_slab_slots.h & src/xmem_mapped_pages.cpp (slab reclamation): tracks slab_used_, open_slabs_, and total_used_ in SlabSlots<Handle> and adds explicit reclaim_empty_slabs(Close&&) (keeping release() non-closing on its own, preserving freeing_everything_keeps_the_slabs). Non-trailing empty slabs leave Handle{} tombstones so active slab indices remain stable; trailing empty slabs are popped cleanly. In free_pages and unpin_slot / x2w_xmem_release_section, empty slab section HANDLEs are collected under memory.mutex and closed via CloseHandle outside memory.mutex, returning their committed slab memory to the OS.
  • tools/startup/run.ps1 & docs/startup-runtime.md: adds [switch]$LazyMemory (setting X2W_XMEM_LAZY_COMMIT=1, X2W_XMEM_LAZY_STARTUP=1, X2W_XMEM_SHARED_VIEWS=1) and documents the updated below-2^40 lazy behavior and slab reclamation.
  • Tests: extends tests/xmem_slab_slots_check.cpp (reclaiming_empty_slabs_closes_handles), tests/xmem_lazy_startup_check.py (combined below_40 + lazy_startup reserve-until-touch + 64 MiB slab alloc/map/unmap/free OS CommitTotal drop, with RUN_SERIAL TRUE in CMakeLists.txt), and tests/xmem_page_stats_check.py (partial slab retention (1, 1, 4095) and full reclamation (0, 0, 0)).

Verified (bcfebe7b rebased on current main)

cmake --build --preset dev --target xmem_shim xmem_slab_slots_check xmem_lazy_imports_check xmem_startup_below_40_check
ctest --preset dev --no-tests=error -R '^(xmem_|startup_run_ps1)' --output-on-failure
  → 100% tests passed, 0 tests failed out of 51
python -B tests/docs_links_check.py     # 23 Markdown files, 539 links
python -B tests/bidi_controls_check.py   # 2016 files, no bidirectional controls
python -B tests/startup_tools_lint_check.py
git diff --check                         # clean

Fail-first mutants (temporary, reverted on 183185ed):

  • Skip reclaim_empty_slabs in collect_empty_slabs: fails xmem_page_stats (slabs, in use, free = (1, 0, 4096), expected (0, 0, 0)) and xmem_lazy_startup (empty slab was not reclaimed: (1, 0, 4096)).
  • Restore && !below_40 in commit_startup_block: fails xmem_lazy_startup (AssertionError: below40 block was committed up front).

NOT established

  • Slabs remain 256 MiB (4096 × 64 KiB slots); a slab closes only when all 4096 slots in that slab are freed and unpinned (a single lingering allocation keeps its slab open).
  • System CommitTotal in xmem_lazy_startup is a global host metric; the new CTest case carries RUN_SERIAL TRUE to isolate it from parallel tests.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6621681762 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2770). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-26T07:26:04Z. --- Extends the opt-in lazy commit and physical-page slab paths so large `< 2^40` startup pools stay reserved until touched and freed physical-page slabs return system commit to the OS. Refs #1199. ### What changed - **`src/xmem_mapped_pages.cpp` (`commit_startup_block`)**: removes `&& !below_40` from `lazy` and assigns `block = keep_startup_block_below_40(...)` instead of returning early, so `0x283` blocks `>= 32 MiB` when both `X2W_XMEM_LAZY_STARTUP=1` and `X2W_XMEM_STARTUP_BELOW_40=1` are set are placed below `2^40` as `MEM_RESERVE` and registered in `lazy_blocks` (committing 256 KiB chunks on first touch / `x2w_xmem_commit_range`, while preserving the `< 2^40` validation and exhaustion refusal). Runs without `X2W_XMEM_LAZY_STARTUP=1` are unchanged. - **`src/xmem_slab_slots.h` & `src/xmem_mapped_pages.cpp` (slab reclamation)**: tracks `slab_used_`, `open_slabs_`, and `total_used_` in `SlabSlots<Handle>` and adds explicit `reclaim_empty_slabs(Close&&)` (keeping `release()` non-closing on its own, preserving `freeing_everything_keeps_the_slabs`). Non-trailing empty slabs leave `Handle{}` tombstones so active slab indices remain stable; trailing empty slabs are popped cleanly. In `free_pages` and `unpin_slot` / `x2w_xmem_release_section`, empty slab section `HANDLE`s are collected under `memory.mutex` and closed via `CloseHandle` outside `memory.mutex`, returning their committed slab memory to the OS. - **`tools/startup/run.ps1` & `docs/startup-runtime.md`**: adds `[switch]$LazyMemory` (setting `X2W_XMEM_LAZY_COMMIT=1`, `X2W_XMEM_LAZY_STARTUP=1`, `X2W_XMEM_SHARED_VIEWS=1`) and documents the updated below-`2^40` lazy behavior and slab reclamation. - **Tests**: extends `tests/xmem_slab_slots_check.cpp` (`reclaiming_empty_slabs_closes_handles`), `tests/xmem_lazy_startup_check.py` (combined `below_40` + `lazy_startup` reserve-until-touch + 64 MiB slab alloc/map/unmap/free OS `CommitTotal` drop, with `RUN_SERIAL TRUE` in `CMakeLists.txt`), and `tests/xmem_page_stats_check.py` (partial slab retention `(1, 1, 4095)` and full reclamation `(0, 0, 0)`). ### Verified (`bcfebe7b` rebased on current `main`) ```powershell cmake --build --preset dev --target xmem_shim xmem_slab_slots_check xmem_lazy_imports_check xmem_startup_below_40_check ctest --preset dev --no-tests=error -R '^(xmem_|startup_run_ps1)' --output-on-failure → 100% tests passed, 0 tests failed out of 51 python -B tests/docs_links_check.py # 23 Markdown files, 539 links python -B tests/bidi_controls_check.py # 2016 files, no bidirectional controls python -B tests/startup_tools_lint_check.py git diff --check # clean ``` **Fail-first mutants** (temporary, reverted on `183185ed`): - Skip `reclaim_empty_slabs` in `collect_empty_slabs`: fails `xmem_page_stats` (`slabs, in use, free = (1, 0, 4096), expected (0, 0, 0)`) and `xmem_lazy_startup` (`empty slab was not reclaimed: (1, 0, 4096)`). - Restore `&& !below_40` in `commit_startup_block`: fails `xmem_lazy_startup` (`AssertionError: below40 block was committed up front`). ### NOT established - Slabs remain 256 MiB (`4096 × 64 KiB` slots); a slab closes only when all 4096 slots in that slab are freed and unpinned (a single lingering allocation keeps its slab open). - System `CommitTotal` in `xmem_lazy_startup` is a global host metric; the new CTest case carries `RUN_SERIAL TRUE` to isolate it from parallel tests. AI-assisted.
upstream-sync closed this pull request 2026-11-26 08:01:50 +00:00
tedin7 commented 2026-11-26 08:01:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T07:31:52Z.

Review: COMMENTED


Review of bcfebe7b (comment only).

Checked:

  • Read the diff of xmem_slab_slots.h and xmem_mapped_pages.cpp. Per-slab counters, tombstones, popping of trailing empty slabs, and fresh_used_ after a pop are consistent. Slab handles are closed outside memory.mutex.
  • commit_startup_block: the below-40 block now keeps its < 2^40 validation and exhaustion refusal, and is registered as lazy only when X2W_XMEM_LAZY_STARTUP=1. Runs without it are unchanged.
  • New C++ cases in xmem_slab_slots_check.cpp and the extended Python checks cover tombstones, trailing reclaim and the lazy below-40 path.
  • No other open or merged PR covers this slice.
  • git diff --check, tests/docs_links_check.py, tests/bidi_controls_check.py: clean. CI on the head is green.
  • This is fixture-level verification only. No executable or game results are claimed.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit bcfebe7b4f76d1ef20add417cf06bf2e4fb4aea5:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target xmem_slab_slots_check xmem_shim -- -j 2): 2.20s (configure 1.96s)
    • Test (ctest --preset dev -R 'xmem' --parallel 3 --no-tests=error --output-on-failure): 56/59 passed (10.76s: cpu_native_xmem_pool_commit 2.44s, xmem_page_stats 0.09s, cpu_native_xmem_default_pair 3.12s, xmem_startup_below_40 0.03s, xmem_startup_below_40_mutant_no_limit 0.03s, xmem_startup_below_40_deployed_ignores_mutants 0.02s, xmem_startup_below_40_mutant_no_limit_no_release 0.02s, xmem_startup_below_40_mutant_no_limit_no_check 0.03s, xmem_shim_mapped_pages 0.25s, startup_indirect_mesh_xmem_arguments_skip_wait_warp 0.15s, startup_indirect_mesh_xmem_arguments_warp 0.17s, xmem_slab_slots 0.04s, startup_mesh_xmem_writer_warp 0.05s, xmem_committed_memory 0.02s, xmem_shim_exports 0.03s, xmem_shim_allocation 0.01s, xmem_shim_default_allocation 0.01s, cpu_native_xmem_physical_pair 1.51s, xmem_shim_tools_memory 0.01s, xmem_shim_transfer_memory 0.02s, xmem_shim_query 0.01s, xmem_shim_working_set 0.02s, xmem_shim_working_set_aggregation 0.01s, xmem_shim_working_set_warp 0.13s, xmem_shim_working_set_hardware 0.06s, xmem_commit_protection 0.02s, xmem_lazy_startup_off 0.08s, xmem_commit_protection_mutate_xva_positive_refused 0.01s, xmem_commit_protection_mutate_xva_commit_accepted 0.01s, xmem_commit_protection_mutate_xva_readonly_accepted 0.01s, xmem_commit_protection_mutate_xva_state_dependent 0.01s, xmem_commit_protection_mutate_private_second_va_aliases 0.01s, xmem_commit_protection_mutate_private_type_mapped 0.01s, xmem_commit_protection_mutate_mapped_decommit_succeeds 0.01s, xmem_lazy_imports 0.02s, xmem_lazy_handler_failure 0.01s, xmem_section_lease_single_page 0.02s, xmem_section_lease_warp 0.11s, xmem_page_batch_inflight_warp 0.04s, xmem_shim_physical_pages 0.74s, xmem_section_lease_mesh_warp 0.05s, xmem_section_lease_vertex_warp 0.05s, xmem_section_lease_hardware 0.05s, xmem_page_batch_inflight_hardware 0.04s, xmem_section_lease_mesh_hardware 0.05s, xmem_section_lease_vertex_hardware 0.05s, xmem_page_runs_device_warp 0.16s, xmem_page_runs_device_hardware 0.14s, startup_indirect_mesh_xmem_arguments_hardware 0.03s, startup_indirect_mesh_xmem_arguments_skip_wait_hardware 0.03s, startup_mesh_xmem_writer_hardware 0.03s, xmem_attribute_scan 3.09s, xmem_attribute_scan_cli_check 3.34s, xmem_shim_page_runs 10.14s, xmem_mapped_pages_commit 0.07s, xmem_mapped_pages_commit_failure 0.07s, xmem_lazy_commit 0.13s, xmem_lazy_commit_off 0.10s, xmem_lazy_startup 0.12s); skipped (capability, not a pass): startup_indirect_mesh_xmem_arguments_hardware, startup_indirect_mesh_xmem_arguments_skip_wait_hardware, startup_mesh_xmem_writer_hardware
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target xmem_slab_slots_check xmem_shim -- -j 2): 10.77s (configure 1.98s)
    • Test (ctest --preset release -R 'xmem' --parallel 3 --no-tests=error --output-on-failure): 56/59 passed (11.26s: startup_mesh_xmem_writer_warp 0.06s, xmem_committed_memory 0.01s, xmem_shim_exports 0.01s, xmem_shim_allocation 0.01s, xmem_shim_default_allocation 0.01s, startup_indirect_mesh_xmem_arguments_skip_wait_warp 0.12s, xmem_shim_tools_memory 0.01s, xmem_shim_transfer_memory 0.02s, xmem_shim_query 0.01s, startup_indirect_mesh_xmem_arguments_warp 0.19s, xmem_shim_working_set_aggregation 0.01s, xmem_shim_working_set 0.02s, xmem_shim_physical_pages 0.15s, xmem_commit_protection 0.02s, xmem_slab_slots 0.01s, xmem_shim_working_set_warp 0.12s, xmem_page_stats 0.07s, xmem_commit_protection_mutate_xva_positive_refused 0.01s, xmem_commit_protection_mutate_xva_commit_accepted 0.01s, xmem_lazy_startup_off 0.09s, xmem_shim_working_set_hardware 0.21s, xmem_commit_protection_mutate_xva_readonly_accepted 0.02s, xmem_commit_protection_mutate_xva_state_dependent 0.02s, xmem_commit_protection_mutate_private_second_va_aliases 0.02s, xmem_commit_protection_mutate_private_type_mapped 0.02s, xmem_commit_protection_mutate_mapped_decommit_succeeds 0.02s, xmem_lazy_imports 0.02s, xmem_lazy_handler_failure 0.02s, xmem_section_lease_single_page 0.02s, xmem_section_lease_warp 0.11s, xmem_section_lease_vertex_warp 0.05s, xmem_section_lease_mesh_warp 0.18s, xmem_section_lease_hardware 0.06s, xmem_page_batch_inflight_warp 0.25s, xmem_page_batch_inflight_hardware 0.07s, xmem_section_lease_mesh_hardware 0.06s, xmem_startup_below_40 0.03s, xmem_startup_below_40_deployed_ignores_mutants 0.02s, xmem_section_lease_vertex_hardware 0.05s, xmem_startup_below_40_mutant_no_limit 0.02s, xmem_startup_below_40_mutant_no_limit_no_check 0.03s, xmem_startup_below_40_mutant_no_limit_no_release 0.03s, startup_indirect_mesh_xmem_arguments_hardware 0.02s, startup_indirect_mesh_xmem_arguments_skip_wait_hardware 0.02s, startup_mesh_xmem_writer_hardware 0.02s, xmem_page_runs_device_hardware 0.16s, xmem_page_runs_device_warp 0.18s, xmem_shim_mapped_pages 0.22s, xmem_attribute_scan 3.11s, xmem_attribute_scan_cli_check 3.39s, cpu_native_xmem_physical_pair 1.19s, cpu_native_xmem_pool_commit 1.87s, cpu_native_xmem_default_pair 2.29s, xmem_shim_page_runs 9.75s, xmem_mapped_pages_commit 0.07s, xmem_mapped_pages_commit_failure 0.07s, xmem_lazy_commit 0.10s, xmem_lazy_commit_off 0.09s, xmem_lazy_startup 0.10s); skipped (capability, not a pass): startup_indirect_mesh_xmem_arguments_hardware, startup_indirect_mesh_xmem_arguments_skip_wait_hardware, startup_mesh_xmem_writer_hardware

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6070076771 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2770#pullrequestreview-6070076771). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T07:31:52Z. **Review:** COMMENTED --- Review of `bcfebe7b` (comment only). Checked: - Read the diff of `xmem_slab_slots.h` and `xmem_mapped_pages.cpp`. Per-slab counters, tombstones, popping of trailing empty slabs, and `fresh_used_` after a pop are consistent. Slab handles are closed outside `memory.mutex`. - `commit_startup_block`: the below-40 block now keeps its `< 2^40` validation and exhaustion refusal, and is registered as lazy only when `X2W_XMEM_LAZY_STARTUP=1`. Runs without it are unchanged. - New C++ cases in `xmem_slab_slots_check.cpp` and the extended Python checks cover tombstones, trailing reclaim and the lazy below-40 path. - No other open or merged PR covers this slice. - `git diff --check`, `tests/docs_links_check.py`, `tests/bidi_controls_check.py`: clean. CI on the head is green. - This is fixture-level verification only. No executable or game results are claimed. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `bcfebe7b4f76d1ef20add417cf06bf2e4fb4aea5`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target xmem_slab_slots_check xmem_shim -- -j 2`): `2.20s` (configure `1.96s`) - Test (`ctest --preset dev -R 'xmem' --parallel 3 --no-tests=error --output-on-failure`): **56/59 passed** (`10.76s`: `cpu_native_xmem_pool_commit` `2.44s`, `xmem_page_stats` `0.09s`, `cpu_native_xmem_default_pair` `3.12s`, `xmem_startup_below_40` `0.03s`, `xmem_startup_below_40_mutant_no_limit` `0.03s`, `xmem_startup_below_40_deployed_ignores_mutants` `0.02s`, `xmem_startup_below_40_mutant_no_limit_no_release` `0.02s`, `xmem_startup_below_40_mutant_no_limit_no_check` `0.03s`, `xmem_shim_mapped_pages` `0.25s`, `startup_indirect_mesh_xmem_arguments_skip_wait_warp` `0.15s`, `startup_indirect_mesh_xmem_arguments_warp` `0.17s`, `xmem_slab_slots` `0.04s`, `startup_mesh_xmem_writer_warp` `0.05s`, `xmem_committed_memory` `0.02s`, `xmem_shim_exports` `0.03s`, `xmem_shim_allocation` `0.01s`, `xmem_shim_default_allocation` `0.01s`, `cpu_native_xmem_physical_pair` `1.51s`, `xmem_shim_tools_memory` `0.01s`, `xmem_shim_transfer_memory` `0.02s`, `xmem_shim_query` `0.01s`, `xmem_shim_working_set` `0.02s`, `xmem_shim_working_set_aggregation` `0.01s`, `xmem_shim_working_set_warp` `0.13s`, `xmem_shim_working_set_hardware` `0.06s`, `xmem_commit_protection` `0.02s`, `xmem_lazy_startup_off` `0.08s`, `xmem_commit_protection_mutate_xva_positive_refused` `0.01s`, `xmem_commit_protection_mutate_xva_commit_accepted` `0.01s`, `xmem_commit_protection_mutate_xva_readonly_accepted` `0.01s`, `xmem_commit_protection_mutate_xva_state_dependent` `0.01s`, `xmem_commit_protection_mutate_private_second_va_aliases` `0.01s`, `xmem_commit_protection_mutate_private_type_mapped` `0.01s`, `xmem_commit_protection_mutate_mapped_decommit_succeeds` `0.01s`, `xmem_lazy_imports` `0.02s`, `xmem_lazy_handler_failure` `0.01s`, `xmem_section_lease_single_page` `0.02s`, `xmem_section_lease_warp` `0.11s`, `xmem_page_batch_inflight_warp` `0.04s`, `xmem_shim_physical_pages` `0.74s`, `xmem_section_lease_mesh_warp` `0.05s`, `xmem_section_lease_vertex_warp` `0.05s`, `xmem_section_lease_hardware` `0.05s`, `xmem_page_batch_inflight_hardware` `0.04s`, `xmem_section_lease_mesh_hardware` `0.05s`, `xmem_section_lease_vertex_hardware` `0.05s`, `xmem_page_runs_device_warp` `0.16s`, `xmem_page_runs_device_hardware` `0.14s`, `startup_indirect_mesh_xmem_arguments_hardware` `0.03s`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware` `0.03s`, `startup_mesh_xmem_writer_hardware` `0.03s`, `xmem_attribute_scan` `3.09s`, `xmem_attribute_scan_cli_check` `3.34s`, `xmem_shim_page_runs` `10.14s`, `xmem_mapped_pages_commit` `0.07s`, `xmem_mapped_pages_commit_failure` `0.07s`, `xmem_lazy_commit` `0.13s`, `xmem_lazy_commit_off` `0.10s`, `xmem_lazy_startup` `0.12s`); skipped (capability, not a pass): `startup_indirect_mesh_xmem_arguments_hardware`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware`, `startup_mesh_xmem_writer_hardware` - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target xmem_slab_slots_check xmem_shim -- -j 2`): `10.77s` (configure `1.98s`) - Test (`ctest --preset release -R 'xmem' --parallel 3 --no-tests=error --output-on-failure`): **56/59 passed** (`11.26s`: `startup_mesh_xmem_writer_warp` `0.06s`, `xmem_committed_memory` `0.01s`, `xmem_shim_exports` `0.01s`, `xmem_shim_allocation` `0.01s`, `xmem_shim_default_allocation` `0.01s`, `startup_indirect_mesh_xmem_arguments_skip_wait_warp` `0.12s`, `xmem_shim_tools_memory` `0.01s`, `xmem_shim_transfer_memory` `0.02s`, `xmem_shim_query` `0.01s`, `startup_indirect_mesh_xmem_arguments_warp` `0.19s`, `xmem_shim_working_set_aggregation` `0.01s`, `xmem_shim_working_set` `0.02s`, `xmem_shim_physical_pages` `0.15s`, `xmem_commit_protection` `0.02s`, `xmem_slab_slots` `0.01s`, `xmem_shim_working_set_warp` `0.12s`, `xmem_page_stats` `0.07s`, `xmem_commit_protection_mutate_xva_positive_refused` `0.01s`, `xmem_commit_protection_mutate_xva_commit_accepted` `0.01s`, `xmem_lazy_startup_off` `0.09s`, `xmem_shim_working_set_hardware` `0.21s`, `xmem_commit_protection_mutate_xva_readonly_accepted` `0.02s`, `xmem_commit_protection_mutate_xva_state_dependent` `0.02s`, `xmem_commit_protection_mutate_private_second_va_aliases` `0.02s`, `xmem_commit_protection_mutate_private_type_mapped` `0.02s`, `xmem_commit_protection_mutate_mapped_decommit_succeeds` `0.02s`, `xmem_lazy_imports` `0.02s`, `xmem_lazy_handler_failure` `0.02s`, `xmem_section_lease_single_page` `0.02s`, `xmem_section_lease_warp` `0.11s`, `xmem_section_lease_vertex_warp` `0.05s`, `xmem_section_lease_mesh_warp` `0.18s`, `xmem_section_lease_hardware` `0.06s`, `xmem_page_batch_inflight_warp` `0.25s`, `xmem_page_batch_inflight_hardware` `0.07s`, `xmem_section_lease_mesh_hardware` `0.06s`, `xmem_startup_below_40` `0.03s`, `xmem_startup_below_40_deployed_ignores_mutants` `0.02s`, `xmem_section_lease_vertex_hardware` `0.05s`, `xmem_startup_below_40_mutant_no_limit` `0.02s`, `xmem_startup_below_40_mutant_no_limit_no_check` `0.03s`, `xmem_startup_below_40_mutant_no_limit_no_release` `0.03s`, `startup_indirect_mesh_xmem_arguments_hardware` `0.02s`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware` `0.02s`, `startup_mesh_xmem_writer_hardware` `0.02s`, `xmem_page_runs_device_hardware` `0.16s`, `xmem_page_runs_device_warp` `0.18s`, `xmem_shim_mapped_pages` `0.22s`, `xmem_attribute_scan` `3.11s`, `xmem_attribute_scan_cli_check` `3.39s`, `cpu_native_xmem_physical_pair` `1.19s`, `cpu_native_xmem_pool_commit` `1.87s`, `cpu_native_xmem_default_pair` `2.29s`, `xmem_shim_page_runs` `9.75s`, `xmem_mapped_pages_commit` `0.07s`, `xmem_mapped_pages_commit_failure` `0.07s`, `xmem_lazy_commit` `0.10s`, `xmem_lazy_commit_off` `0.09s`, `xmem_lazy_startup` `0.10s`); skipped (capability, not a pass): `startup_indirect_mesh_xmem_arguments_hardware`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware`, `startup_mesh_xmem_writer_hardware` AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-26 08:01:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T07:26:11Z.


Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T07:26:08.976519Z
We couldn’t complete this review. Comment @codex review to try again.
bcfebe7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7185453964 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2770#issuecomment-7185453964). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-26T07:26:11Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"bcfebe7b4f76d1ef20add417cf06bf2e4fb4aea5","has_any_findings":true,"has_unresolved_findings":true,"status":"failed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ❌ Failed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ❌ **Failed** <relative-time datetime="2026-11-26T07:26:08.976519Z">2026-11-26T07:26:08.976519Z</relative-time><br/>We couldn’t complete this review. Comment `@codex review` to try again. | `bcfebe7` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot commented 2026-11-26 08:01:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T07:26:16Z.


You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7185455377 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2770#issuecomment-7185455377). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-26T07:26:16Z. --- You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage). To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your [settings](https://chatgpt.com/settings/code-review).
tedin7 commented 2026-11-26 08:01:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T07:31:57Z.


Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit bcfebe7b4f76d1ef20add417cf06bf2e4fb4aea5:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target xmem_slab_slots_check xmem_shim -- -j 2): 2.20s (configure 1.96s)
    • Test (ctest --preset dev -R 'xmem' --parallel 3 --no-tests=error --output-on-failure): 56/59 passed (10.76s: cpu_native_xmem_pool_commit 2.44s, xmem_page_stats 0.09s, cpu_native_xmem_default_pair 3.12s, xmem_startup_below_40 0.03s, xmem_startup_below_40_mutant_no_limit 0.03s, xmem_startup_below_40_deployed_ignores_mutants 0.02s, xmem_startup_below_40_mutant_no_limit_no_rel 0.02s, xmem_startup_below_40_mutant_no_limit_no_check 0.03s, xmem_shim_mapped_pages 0.25s, startup_indirect_mesh_xmem_arguments_skip_wait_warp 0.15s, startup_indirect_mesh_xmem_arguments_warp 0.17s, xmem_slab_slots 0.04s, startup_mesh_xmem_writer_warp 0.05s, xmem_committed_memory 0.02s, xmem_shim_exports 0.03s, xmem_shim_allocation 0.01s, xmem_shim_default_allocation 0.01s, cpu_native_xmem_physical_pair 1.51s, xmem_shim_tools_memory 0.01s, xmem_shim_transfer_memory 0.02s, xmem_shim_query 0.01s, xmem_shim_working_set 0.02s, xmem_shim_working_set_aggregation 0.01s, xmem_shim_working_set_warp 0.13s, xmem_shim_working_set_hardware 0.06s, xmem_commit_protection 0.02s, xmem_lazy_startup_off 0.08s, xmem_commit_protection_mutate_xva_positive_refused 0.01s, xmem_commit_protection_mutate_xva_commit_accepted 0.01s, xmem_commit_protection_mutate_xva_readonly_accepted 0.01s, xmem_commit_protection_mutate_xva_state_dependent 0.01s, xmem_commit_protection_mutate_private_second_va_aliases 0.01s, xmem_commit_protection_mutate_private_type_mapped 0.01s, xmem_commit_protection_mutate_mapped_decommit_succeeds 0.01s, xmem_lazy_imports 0.02s, xmem_lazy_handler_failure 0.01s, xmem_section_lease_single_page 0.02s, xmem_section_lease_warp 0.11s, xmem_page_batch_inflight_warp 0.04s, xmem_shim_physical_pages 0.74s, xmem_section_lease_mesh_warp 0.05s, xmem_section_lease_vertex_warp 0.05s, xmem_section_lease_hardware 0.05s, xmem_page_batch_inflight_hardware 0.04s, xmem_section_lease_mesh_hardware 0.05s, xmem_section_lease_vertex_hardware 0.05s, xmem_page_runs_device_warp 0.16s, xmem_page_runs_device_hardware 0.14s, startup_indirect_mesh_xmem_arguments_hardware 0.03s, startup_indirect_mesh_xmem_arguments_skip_wait_hardware 0.03s, startup_mesh_xmem_writer_hardware 0.03s, xmem_attribute_scan 3.09s, xmem_attribute_scan_cli_check 3.34s, xmem_shim_page_runs 10.14s, xmem_mapped_pages_commit 0.07s, xmem_mapped_pages_commit_failure 0.07s, xmem_lazy_commit 0.13s, xmem_lazy_commit_off 0.10s, xmem_lazy_startup 0.12s); skipped (capability, not a pass): startup_indirect_mesh_xmem_arguments_hardware, startup_indirect_mesh_xmem_arguments_skip_wait_hardware, startup_mesh_xmem_writer_hardware
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target xmem_slab_slots_check xmem_shim -- -j 2): 10.77s (configure 1.98s)
    • Test (ctest --preset release -R 'xmem' --parallel 3 --no-tests=error --output-on-failure): 56/59 passed (11.26s: startup_mesh_xmem_writer_warp 0.06s, xmem_committed_memory 0.01s, xmem_shim_exports 0.01s, xmem_shim_allocation 0.01s, xmem_shim_default_allocation 0.01s, startup_indirect_mesh_xmem_arguments_skip_wait_warp 0.12s, xmem_shim_tools_memory 0.01s, xmem_shim_transfer_memory 0.02s, xmem_shim_query 0.01s, startup_indirect_mesh_xmem_arguments_warp 0.19s, xmem_shim_working_set_aggregation 0.01s, xmem_shim_working_set 0.02s, xmem_shim_physical_pages 0.15s, xmem_commit_protection 0.02s, xmem_slab_slots 0.01s, xmem_shim_working_set_warp 0.12s, xmem_page_stats 0.07s, xmem_commit_protection_mutate_xva_positive_refused 0.01s, xmem_commit_protection_mutate_xva_commit_accepted 0.01s, xmem_lazy_startup_off 0.09s, xmem_shim_working_set_hardware 0.21s, xmem_commit_protection_mutate_xva_readonly_accepted 0.02s, xmem_commit_protection_mutate_xva_state_dependent 0.02s, xmem_commit_protection_mutate_private_second_va_aliases 0.02s, xmem_commit_protection_mutate_private_type_mapped 0.02s, xmem_commit_protection_mutate_mapped_decommit_succeeds 0.02s, xmem_lazy_imports 0.02s, xmem_lazy_handler_failure 0.02s, xmem_section_lease_single_page 0.02s, xmem_section_lease_warp 0.11s, xmem_section_lease_vertex_warp 0.05s, xmem_section_lease_mesh_warp 0.18s, xmem_section_lease_hardware 0.06s, xmem_page_batch_inflight_warp 0.25s, xmem_page_batch_inflight_hardware 0.07s, xmem_section_lease_mesh_hardware 0.06s, xmem_startup_below_40 0.03s, xmem_startup_below_40_deployed_ignores_mutants 0.02s, xmem_section_lease_vertex_hardware 0.05s, xmem_startup_below_40_mutant_no_limit 0.02s, xmem_startup_below_40_mutant_no_limit_no_check 0.03s, xmem_startup_below_40_mutant_no_limit_no_rel 0.03s, startup_indirect_mesh_xmem_arguments_hardware 0.02s, startup_indirect_mesh_xmem_arguments_skip_wait_hardware 0.02s, startup_mesh_xmem_writer_hardware 0.02s, xmem_page_runs_device_hardware 0.16s, xmem_page_runs_device_warp 0.18s, xmem_shim_mapped_pages 0.22s, xmem_attribute_scan 3.11s, xmem_attribute_scan_cli_check 3.39s, cpu_native_xmem_physical_pair 1.19s, cpu_native_xmem_pool_commit 1.87s, cpu_native_xmem_default_pair 2.29s, xmem_shim_page_runs 9.75s, xmem_mapped_pages_commit 0.07s, xmem_mapped_pages_commit_failure 0.07s, xmem_lazy_commit 0.10s, xmem_lazy_commit_off 0.09s, xmem_lazy_startup 0.10s); skipped (capability, not a pass): startup_indirect_mesh_xmem_arguments_hardware, startup_indirect_mesh_xmem_arguments_skip_wait_hardware, startup_mesh_xmem_writer_hardware

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7185558424 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2770#issuecomment-7185558424). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T07:31:57Z. --- Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `bcfebe7b4f76d1ef20add417cf06bf2e4fb4aea5`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target xmem_slab_slots_check xmem_shim -- -j 2`): `2.20s` (configure `1.96s`) - Test (`ctest --preset dev -R 'xmem' --parallel 3 --no-tests=error --output-on-failure`): **56/59 passed** (`10.76s`: `cpu_native_xmem_pool_commit` `2.44s`, `xmem_page_stats` `0.09s`, `cpu_native_xmem_default_pair` `3.12s`, `xmem_startup_below_40` `0.03s`, `xmem_startup_below_40_mutant_no_limit` `0.03s`, `xmem_startup_below_40_deployed_ignores_mutants` `0.02s`, `xmem_startup_below_40_mutant_no_limit_no_rel` `0.02s`, `xmem_startup_below_40_mutant_no_limit_no_check` `0.03s`, `xmem_shim_mapped_pages` `0.25s`, `startup_indirect_mesh_xmem_arguments_skip_wait_warp` `0.15s`, `startup_indirect_mesh_xmem_arguments_warp` `0.17s`, `xmem_slab_slots` `0.04s`, `startup_mesh_xmem_writer_warp` `0.05s`, `xmem_committed_memory` `0.02s`, `xmem_shim_exports` `0.03s`, `xmem_shim_allocation` `0.01s`, `xmem_shim_default_allocation` `0.01s`, `cpu_native_xmem_physical_pair` `1.51s`, `xmem_shim_tools_memory` `0.01s`, `xmem_shim_transfer_memory` `0.02s`, `xmem_shim_query` `0.01s`, `xmem_shim_working_set` `0.02s`, `xmem_shim_working_set_aggregation` `0.01s`, `xmem_shim_working_set_warp` `0.13s`, `xmem_shim_working_set_hardware` `0.06s`, `xmem_commit_protection` `0.02s`, `xmem_lazy_startup_off` `0.08s`, `xmem_commit_protection_mutate_xva_positive_refused` `0.01s`, `xmem_commit_protection_mutate_xva_commit_accepted` `0.01s`, `xmem_commit_protection_mutate_xva_readonly_accepted` `0.01s`, `xmem_commit_protection_mutate_xva_state_dependent` `0.01s`, `xmem_commit_protection_mutate_private_second_va_aliases` `0.01s`, `xmem_commit_protection_mutate_private_type_mapped` `0.01s`, `xmem_commit_protection_mutate_mapped_decommit_succeeds` `0.01s`, `xmem_lazy_imports` `0.02s`, `xmem_lazy_handler_failure` `0.01s`, `xmem_section_lease_single_page` `0.02s`, `xmem_section_lease_warp` `0.11s`, `xmem_page_batch_inflight_warp` `0.04s`, `xmem_shim_physical_pages` `0.74s`, `xmem_section_lease_mesh_warp` `0.05s`, `xmem_section_lease_vertex_warp` `0.05s`, `xmem_section_lease_hardware` `0.05s`, `xmem_page_batch_inflight_hardware` `0.04s`, `xmem_section_lease_mesh_hardware` `0.05s`, `xmem_section_lease_vertex_hardware` `0.05s`, `xmem_page_runs_device_warp` `0.16s`, `xmem_page_runs_device_hardware` `0.14s`, `startup_indirect_mesh_xmem_arguments_hardware` `0.03s`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware` `0.03s`, `startup_mesh_xmem_writer_hardware` `0.03s`, `xmem_attribute_scan` `3.09s`, `xmem_attribute_scan_cli_check` `3.34s`, `xmem_shim_page_runs` `10.14s`, `xmem_mapped_pages_commit` `0.07s`, `xmem_mapped_pages_commit_failure` `0.07s`, `xmem_lazy_commit` `0.13s`, `xmem_lazy_commit_off` `0.10s`, `xmem_lazy_startup` `0.12s`); skipped (capability, not a pass): `startup_indirect_mesh_xmem_arguments_hardware`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware`, `startup_mesh_xmem_writer_hardware` - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target xmem_slab_slots_check xmem_shim -- -j 2`): `10.77s` (configure `1.98s`) - Test (`ctest --preset release -R 'xmem' --parallel 3 --no-tests=error --output-on-failure`): **56/59 passed** (`11.26s`: `startup_mesh_xmem_writer_warp` `0.06s`, `xmem_committed_memory` `0.01s`, `xmem_shim_exports` `0.01s`, `xmem_shim_allocation` `0.01s`, `xmem_shim_default_allocation` `0.01s`, `startup_indirect_mesh_xmem_arguments_skip_wait_warp` `0.12s`, `xmem_shim_tools_memory` `0.01s`, `xmem_shim_transfer_memory` `0.02s`, `xmem_shim_query` `0.01s`, `startup_indirect_mesh_xmem_arguments_warp` `0.19s`, `xmem_shim_working_set_aggregation` `0.01s`, `xmem_shim_working_set` `0.02s`, `xmem_shim_physical_pages` `0.15s`, `xmem_commit_protection` `0.02s`, `xmem_slab_slots` `0.01s`, `xmem_shim_working_set_warp` `0.12s`, `xmem_page_stats` `0.07s`, `xmem_commit_protection_mutate_xva_positive_refused` `0.01s`, `xmem_commit_protection_mutate_xva_commit_accepted` `0.01s`, `xmem_lazy_startup_off` `0.09s`, `xmem_shim_working_set_hardware` `0.21s`, `xmem_commit_protection_mutate_xva_readonly_accepted` `0.02s`, `xmem_commit_protection_mutate_xva_state_dependent` `0.02s`, `xmem_commit_protection_mutate_private_second_va_aliases` `0.02s`, `xmem_commit_protection_mutate_private_type_mapped` `0.02s`, `xmem_commit_protection_mutate_mapped_decommit_succeeds` `0.02s`, `xmem_lazy_imports` `0.02s`, `xmem_lazy_handler_failure` `0.02s`, `xmem_section_lease_single_page` `0.02s`, `xmem_section_lease_warp` `0.11s`, `xmem_section_lease_vertex_warp` `0.05s`, `xmem_section_lease_mesh_warp` `0.18s`, `xmem_section_lease_hardware` `0.06s`, `xmem_page_batch_inflight_warp` `0.25s`, `xmem_page_batch_inflight_hardware` `0.07s`, `xmem_section_lease_mesh_hardware` `0.06s`, `xmem_startup_below_40` `0.03s`, `xmem_startup_below_40_deployed_ignores_mutants` `0.02s`, `xmem_section_lease_vertex_hardware` `0.05s`, `xmem_startup_below_40_mutant_no_limit` `0.02s`, `xmem_startup_below_40_mutant_no_limit_no_check` `0.03s`, `xmem_startup_below_40_mutant_no_limit_no_rel` `0.03s`, `startup_indirect_mesh_xmem_arguments_hardware` `0.02s`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware` `0.02s`, `startup_mesh_xmem_writer_hardware` `0.02s`, `xmem_page_runs_device_hardware` `0.16s`, `xmem_page_runs_device_warp` `0.18s`, `xmem_shim_mapped_pages` `0.22s`, `xmem_attribute_scan` `3.11s`, `xmem_attribute_scan_cli_check` `3.39s`, `cpu_native_xmem_physical_pair` `1.19s`, `cpu_native_xmem_pool_commit` `1.87s`, `cpu_native_xmem_default_pair` `2.29s`, `xmem_shim_page_runs` `9.75s`, `xmem_mapped_pages_commit` `0.07s`, `xmem_mapped_pages_commit_failure` `0.07s`, `xmem_lazy_commit` `0.10s`, `xmem_lazy_commit_off` `0.09s`, `xmem_lazy_startup` `0.10s`); skipped (capability, not a pass): `startup_indirect_mesh_xmem_arguments_hardware`, `startup_indirect_mesh_xmem_arguments_skip_wait_hardware`, `startup_mesh_xmem_writer_hardware` AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-26 08:01:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T07:35:04Z.


Independent Windows Release receipt on bcfebe7b. The source-built below-40 block remained reserved before touch. Reclaiming the synthetic slab returned 64 MiB of system commit in this serial run. The 13 adjacent mapping and lease checks all passed. I also ran the three hardware cases the Win2025 receipt skipped: startup_indirect_mesh_xmem_arguments_hardware, startup_indirect_mesh_xmem_arguments_skip_wait_hardware, and startup_mesh_xmem_writer_hardware. All passed on RTX 4060 Laptop 32.0.16.1656, Windows 11 build 26200, debug layer enabled and no warnings or errors. This fills the physical-adapter coverage in the existing review. The matched original-executable replay for #1199 is still open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7185613669 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2770#issuecomment-7185613669). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T07:35:04Z. --- Independent Windows Release receipt on bcfebe7b. The source-built below-40 block remained reserved before touch. Reclaiming the synthetic slab returned 64 MiB of system commit in this serial run. The 13 adjacent mapping and lease checks all passed. I also ran the three hardware cases the Win2025 receipt skipped: startup_indirect_mesh_xmem_arguments_hardware, startup_indirect_mesh_xmem_arguments_skip_wait_hardware, and startup_mesh_xmem_writer_hardware. All passed on RTX 4060 Laptop 32.0.16.1656, Windows 11 build 26200, debug layer enabled and no warnings or errors. This fills the physical-adapter coverage in the existing review. The matched original-executable replay for #1199 is still open.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
R0Y00/Xbox2Windows!2762
No description provided.