Repository navigation
kernelx: skip coherent UMA fallback for physical pages on sparse layouts - #2157
Merged
raylitebull merged 1 commit intoNov 25, 2026
Merged
Conversation
When sparse UMA is exhausted, AllocateTitlePhysicalPages fell back to u.alloc in the committed coherent window without respecting the 96 MiB KEEP headroom in VirtualAlloc, and created non-lazy homes that cannot be decommitted when mapped elsewhere. Skip the coherent u.alloc fallback when u.has_sparse() is true so overflow goes straight to MEM_RESERVE plain memory (keeping u.alloc only for coherent-only layouts), and add synthetic unit tests. Part of xcl-dev#1566 Assisted-by: Antigravity (Gemini 4 Neon)
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Independent Windows x64 test report on commit Environment
Command xcl-97fdf2b9ff8e1482.exe hle::kernelx::tests::physical_home_ --nocapture --test-threads=1Results
Not tested
AI use
|
Member
|
Code review on
Remaining before merge: |
raylitebull
added a commit
to raylitebull/xcl
that referenced
this pull request
Nov 25, 2026
…ility - kernelx: keep plain XMemVirtualAlloc and alloc_physical_home plain fallbacks below the 40-bit VA ceiling via VirtualAlloc2 when available; skip committing lazy/unmapped pages on read_physical_pages while ensuring lazy pages before writes; unmark freed lazy pages in FreeTitlePhysicalPages. (Coherent fallback skip on sparse layouts is already on main via xcl-dev#2157; XMemIsToolsMemAvailable via xcl-dev#563.) - dstorage: refresh zero or stale (freed) physical page-table entries via read_own (xcl-dev#476/xcl-dev#509 safe) on write/read retry; extend the parallel decompression pool to handle physical-page destinations and supported BCPack requests. - gameinput & kbm: skip disconnected-pad XInput rumble stalls and deduplicate unchanged motor speeds; implement bounded reading history for GetNextReading / GetPreviousReading; extend XCL_PRESS_AT with triggers, sticks, LS/RS, and optional durations; add Z/C holdable bumper keys, require mouse capture and non-sizing for mouse buttons, and guard KBM mouse velocity against sub-0.5 ms zero-delta poll decay.
anoyarou
added a commit
to anoyarou/xcl
that referenced
this pull request
Nov 25, 2026
Brings main to full parity with upstream/main (cdb0891), including: - World rendering & gameplay: xcl-dev#1991, xcl-dev#1988, xcl-dev#1984, xcl-dev#2028, xcl-dev#2078 - Memory / VRAM / PSO: xcl-dev#1985, xcl-dev#2157, xcl-dev#2178, xcl-dev#2195, xcl-dev#2176, xcl-dev#1996, xcl-dev#1914 - Direct DXIL & shaders: xcl-dev#2120, xcl-dev#2174, xcl-dev#2194, xcl-dev#2207, xcl-dev#1951, xcl-dev#1973, xcl-dev#2156, xcl-dev#2064 - Preserves local Linux/Wine customizations: docs/linux.md, scripts/linux/*, in-process Wine XAsync (xgameruntime/api.rs), loader watchdog bypass, and Wine MEM_WRITE_WATCH bypass on coherent UMA windows (gpu/uma.rs). Assisted-by: Antigravity (Gemini 4)
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.
When sparse UMA windows are full on a runtime layout,
AllocateTitlePhysicalPagescurrently falls back tou.allocin the committed coherent window before falling back toMEM_RESERVEplain memory. UnlikeVirtualAlloc(which reserves 96 MiBKEEPheadroom for XCL's own readback/internal allocations), that fallback can consume the remaining coherent headroom and yields a home wherelazy_home(home)isfalse(already committed and never decommitted when moved away).This skips the coherent
u.allocfallback whenu.has_sparse()is true, sending sparse-layout overflow straight toMEM_RESERVEplain memory while preservingu.allocfor coherent-only layouts without sparse windows. Part of #1566.What is in it
alloc_physical_home&AllocateTitlePhysicalPages: skipu.allocwhenu.has_sparse()is true (crates/xcl/src/hle/kernelx.rs)crates/xcl/src/hle/kernelx.rs)Tested
cargo test) + release (smoke.ps1)cargo test -p xcl --lib hle::kernelx::tests: 38 passed, 0 failed, 1 ignored (scatter_timing)cargo test --workspace -- --test-threads=4(withXCL_DXC_DIR=D:\Windows Kits\10\bin\10.0.26100.0\x64): 1156 passed, 0 failed, 46 ignored (24SKIPPEDGPU sub-checks on RTX 5080 wave32: 20no wave64, 3DIFFERS_ON_1426f16/V_CVT_F16_F32 per-lane refusals, 1no heap windows)Regression run
Not tested
sparse 7445 MB), so sparse overflow was exercised by the synthetic unit test rather than the retail run (withXCL_DXC_DIRonD:\before VFS: exempt xcl.exe and host tool dirs from console drive mounts #2101 lands, host DXC lookup is also intercepted by theD:mount in both themainand PR smoke runs)AI use
kernelx.rs/uma.rs, wrote the fix and unit tests, ran the test suite and smoke runs, and drafted this PR description.