Repository navigation
Conversation
memory_report::snapshot() read the UMA window's size through uma::get(), which reserves and commits the window on first use. A sample in a process that had no window yet (a fresh child, a test) committed it, and so changed the memory it was measuring. uma::existing() returns the window only if something else made it. The child-process regression and the accessor are @thehollowedone's from their review of xcl-dev#2697. The test fails without the fix ("a memory sample made the UMA window") and passes with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows charges a process's D3D12 heaps, local and non-local, to its commit, so `memory by owner` left them in commit `other` and counted them again under video memory. The new `D3D12 heaps` part is both DXGI segments' usage less the committed windows the GPU reads in place (imported, or remade as a driver heap on NVIDIA), which the `UMA window` part already has; a shadowed window is a separate copy and is not subtracted. The part and uma_imported_bytes() are from xcl-dev#2697 (@joeypercia), adapted to main's per-window heap list. On an RTX 3080 (621.40), with a retail title in the world, a VirtualAlloc trace put 19,470 MB of commit on dxgmms2.sys against 19,468 MB of local + non-local, and VMMap's write-combined private regions matched local + non-local less the 4,095 MB window to ~150 MB (xcl-dev#3211). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
RTX 4090 24 GB, 32 GB RAM, retail world to device removal: with this PR Setup
System commit. The rest of the system holds a steady 12.4–12.9 GB of commit. So on this 32 GB PC, system commit is at its limit once the process holds ~43–44 GB.
Not tested: VMMap or a AI use: Claude Code (Claude Opus 5.5) built the tree, ran the tests and the replays, and wrote this report. The person running these tests asked for it. |
|
Closing as a duplicate: #3229 (merged) adds the same D3D12 heaps commit part and also covers the mixed and legacy UMA modes. |
Stacked on #3343; only the top commit (
0f0cc342) belongs here.Windows charges a process's D3D12 heaps, local and non-local, to its commit, so
memory by ownerleft them in commitotherand counted them a second time under video memory. A newD3D12 heapscommit part is both DXGI segments' usage less the committed windows the GPU reads in place (imported, or remade as a driver heap on NVIDIA), which theUMA windowpart already has. A shadowed window is a separate copy in video memory and is not subtracted. Part of #3211 (C).The part and
uma_imported_bytes()come from #2697 (@joeypercia), adapted tomain's per-window heap list. #2999 carries them too but conflicts withmain; I asked there before opening this, and will close this if #2999 is rebased first.What is in it
hle/d3d12x/real.rs:uma_imported_bytes(), the bytes of the committed windows inUMA_HEAPS, 0 when shadowed or before they are openedhle/d3d12x/memory_report.rs:heap_charge()and theD3D12 heapspart; a unit test ofheap_charge, and the device test expects the new partTested
cargo test --workspace --no-fail-fast -- --test-threads=4at0f0cc342: 2,620 passed, 0 failed, 49 ignored (41 targets)D3D12 heapspart against VMMap's write-combined private regions, and commitotheragainst VMMap's private memory less the UMA window, sparse CPU copy and write-combined regions (MB):D3D12 heapsotherBefore this,
otherat 64 s would have been 16,511 MB. Snapshots taken while the system was paging came back partial and are left out. AVirtualAlloctrace of an earlier run (#3211) put 19,470 MB of commit ondxgmms2.sysagainst 19,468 MB of local + non-local.Regression run
A retail title, 120 s,
XCL_PREPARE=0,XCL_PRESS_AT=25:A(loads a save into the world), the same DXIL cache copy and data root for both.Not tested
XCL_UMA_SHADOW=1),XCL_UMA_DRIVER=mixed, other NVIDIA driversAI use
main, wrote the tests, ran the tests, title runs and smoke runs, wrote this description. I checked the diff and the results.🤖 Generated with Claude Code