Skip to content

XMem: title-placed reservations are write-watched only when asked for (Series S boot, #3023) - #3126

Open
TheSovietWaffle wants to merge 1 commit into
trustno1-coder:mainfrom
TheSovietWaffle:fix/series-s-watch-placed
Open

TheSovietWaffle wants to merge 1 commit into
trustno1-coder:mainfrom
TheSovietWaffle:fix/series-s-watch-placed

Conversation

@TheSovietWaffle

@TheSovietWaffle TheSovietWaffle commented Nov 29, 2026 •

Copy link
Copy Markdown

Addresses #3023. The kernel stall itself is not explained here; this removes it from the default path and keeps the title-placed watch testable.

What it changes

78324212 gave title-placed reservations MEM_WRITE_WATCH by default. On the Series S the title's 3977 MB pool at 0x2000000000 goes through VirtualAlloc2 with that watch and never returns, so the profile hangs before the menu, the thread stays in the kernel, and the process cannot be killed. The reporter in #3023 bisected it to that commit and booted a build with watch_placement forced to false (a one-line change); that is the evidence this change is built on.

Comparing the last good build, v2026.11.28.03, with main, the write-watch change in xmem.rs is this branch: .28.03 watched only host-placed allocations (if constrained { ... kind |= MEM_WRITE_WATCH }). Unset now restores exactly that, and the switch keeps the newer path available.

This makes that path opt-in instead of default:

  • VICTORY_WATCH_PLACED_XMEM=1: ask for the watch, as v2026.11.29.02 did, so the title-placed path can keep being tested.
  • Unset (the default): placed reservations are not watched. Host-placed reservations (MEM_ADDRESS_REQUIREMENTS) are still watched exactly as before, a placeholder is still never watched, and a MEM_WRITE_WATCH the title asked for itself is still honoured.
  • The decision is a unit-tested function, can_watch_placement; the switch is read once through a OnceLock, like VICTORY_WATCH_LARGE_XMEM beside it.

Nothing else changes: the existing fallback for a refused watch, the "XMemVirtualAlloc without write watching" line, and all host-placed watching stay as they were. Series X is unaffected, because its pool is placed by us, on the constrained path.

I considered limiting the watch by size instead (the hang is on the 3977 MB pool, the earlier 82 MB placements went through), but the cause is not understood, so a threshold would be a guess about which sizes are safe. Off by default is the conservative choice, and the switch leaves the experiment available.

How it was tested

Checked for overlap

@github-actions github-actions Bot added the pr-fix Pull request: fixes a bug label Nov 29, 2026
@github-actions github-actions Bot changed the title [pr-fix] XMem: title-placed reservations are write-watched only when asked for (Series S boot, #3023) XMem: title-placed reservations are write-watched only when asked for (Series S boot, #3023) Nov 29, 2026
@TheSovietWaffle
TheSovietWaffle force-pushed the fix/series-s-watch-placed branch from 3316cf2 to 59be640 Compare November 29, 2026 22:16
moritz-eckhard-nickel added a commit to moritz-eckhard-nickel/VIctory-NVIDIA that referenced this pull request Nov 30, 2026
…s are write-watched only when asked for (Series S boot, trustno1-coder#3023)

trustno1-coder#3126 by TheSovietWaffle, head 59be640.
On the Series S the title's 3977 MB pool at 0x2000000000 made VirtualAlloc2
with MEM_WRITE_WATCH never return (v2026.11.29.01, trustno1-coder#3023): the profile hangs
before the menu and the process cannot be killed. The reporter bisected it to
7832421 and booted a build with watch_placement forced false.

Keep that path, but off by default: VICTORY_WATCH_PLACED_XMEM=1 asks for the
watch to keep testing it. Host-placed reservations are watched as before, and
placeholders and a watch the title asked for itself are honoured as asked.
The predicate is a unit-tested function; the switch is read once, like
VICTORY_WATCH_LARGE_XMEM beside it.
@TheSovietWaffle
TheSovietWaffle force-pushed the fix/series-s-watch-placed branch from 59be640 to 92458a4 Compare November 30, 2026 00:37
JustOptimize added a commit to JustOptimize/VIctory-Enhanced that referenced this pull request Nov 30, 2026
… (PR trustno1-coder#3126)

Port of trustno1-coder#3126, applied clean. Series S boot hang (trustno1-coder#3023): placed reservations are no longer MEM_WRITE_WATCH by default; VICTORY_WATCH_PLACED_XMEM=1 brings the old behaviour back. Host-placed reservations are watched as before. Upstream: unit test only, and the author's smoke run did not take the title-placed path, so the fix itself is untested there. On this PC the big pool may be host-placed, in which case nothing changes.
JustOptimize added a commit to JustOptimize/VIctory-Enhanced that referenced this pull request Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull request: fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant