Memory: drop the CPU copy of idle sparse-window tiles once the GPU tile holds them (read back on touch) #2815
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by jeremiahmvze on 2026-11-26T15:09:57Z.
Proposal: once a coherent/sparse-window page's bytes are safely in its GPU tile, drop the CPU copy, and copy the tile back from video memory only if the CPU touches the page again.
Why: on a 32 GB RAM machine the title's memory is charged twice. On our PC (RTX 4090 24 GB, 32 GB RAM, system-managed page file, a commit limit of about 69.5 GB at start, about 26 GB used before XCL starts), XCL peaks at 42–48 GB of commit on title 7952987A. Runs regularly lose the device at the commit edge (
0x887a0005/0006) when Windows doesn't grow the page file in time. At about 300 s the commit splits roughly into: video heaps 20–24 GB (charged to commit), the CPU side of the sparse windows about 7.1 GB, the UMA window 0.5 GB, and other 13.5 GB. The sparse windows' video tiles hold about 7.2 GB of the same data.What we measured (an ad-hoc probe, not upstream code): 256 committed pages were sampled across mapped sparse tiles at about 60 s and made
PAGE_NOACCESS, logging the first touch.Sketch:
ensurehooks askernelx/lazy.rspages.Related, from a search (none does this):
kernelx/lazy.rs: commit on first touch, but never decommits.e4b66e57/2af01554onamd-dev): GPU-only buffers with no CPU commit, read back onMap().We haven't written this. We're posting it in case it fits someone's plans, or there's a reason it can't work that we're missing.
Imported from ivall/xcl. Originally posted by Krigsexe on 2026-11-26T16:59:28Z.
@jeremiahmvze I was just explain that here : https://github.com/xcl-dev/xcl/pull/1466 but no one care... ^^