Repository navigation
Enable automatic vNUMA for large WSL VMs - #41741
Merged
Merged
Conversation
Add the HCS NUMA topology object so HCS can derive a supported virtual topology for large processor counts instead of requiring WSL to clamp the VM to 256 processors. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea0c67c5-0211-479b-a7b5-59aebb19b71c
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The vNUMA setting must be gated to supported Windows builds to avoid VM creation regressions on older systems.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Enables automatic HCS-derived vNUMA topology for large WSL and WSLC virtual machines.
Changes:
- Adds optional NUMA serialization to the local HCS schema.
- Enables automatic vNUMA for WSL and WSLC VMs.
- Adds serialization and large-host processor-count coverage.
| File | Description |
|---|---|
src/windows/common/hcs_schema.h |
Adds optional NUMA topology serialization. |
src/windows/service/exe/WslCoreVm.cpp |
Enables automatic vNUMA for WSL VMs. |
src/windows/service/exe/HcsVirtualMachine.cpp |
Enables automatic vNUMA for WSLC VMs. |
test/windows/HcsSchemaUnitTests.cpp |
Tests empty NUMA object serialization. |
test/windows/UnitTests.cpp |
Tests processor counts above 256. |
test/windows/CMakeLists.txt |
Registers the new schema test source. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Preserve the existing single-node HCS configuration on older Windows builds where vNUMA topology creation is unsupported. Co-authored-by: Copilot <[email protected]> Copilot-Session: ea0c67c5-0211-479b-a7b5-59aebb19b71c
Co-authored-by: Copilot <[email protected]> Copilot-Session: ea0c67c5-0211-479b-a7b5-59aebb19b71c
1 of 2 tasks
Ben Hillis (benhillis)
marked this pull request as ready for review
October 1, 2026 00:02
Ben Hillis (benhillis)
enabled auto-merge (squash)
October 2, 2026 00:49
Blue (OneBlue)
approved these changes
Oct 2, 2026
| OMIT_IF_EMPTY(j, processor, EnablePerfmonLbr) | ||
| } | ||
|
|
||
| struct Numa |
Collaborator
There was a problem hiding this comment.
nit: We can reuse EmptyObject for this
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.



Summary
Enable automatic virtual NUMA topology generation for WSL virtual machines on Windows build 26100 and newer.
WSL previously omitted
ComputeTopology.Numafrom its HCS configuration. HCS therefore treated the VM as a single virtual NUMA node/socket, which fails when the requested processor count exceeds the supported per-socket topology. Emitting an emptyNumaobject asks HCS to derive the virtual topology from the requested resources and physical host topology.This change:
Validation
wslteststarget successfully.Numatopology, and HCS rejected the single-node configuration withMaxVpCountPerSocketLimit: 256andmaxVpCountPerSocket: 384.Fixes #41731