xmem: report the console title memory budget #513
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/513"
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 brcly/TuxBox. Originally posted by csj0oe on 2026-11-29T18:29:04Z.
What
A Series X leaves a title 13,312 MiB. TuxBox reported host RAM and the whole process commit instead, wrote the same number into
GameLimitandGpuOptimalBandwidthLimit, and reported the whole process as the title's usage. A title that sizes streaming pools or texture caches fromGameLimit − GameUsedmade a different decision on every PC.usedfrom live allocations the title owns,peakhigh-water, physical page count from live 64 KiB pages.XMemGetWorkingSetStatisticsaccepts any selector with top nibble0x2, zeroes the 120-byte result, fills the selected groups and returnsTRUE.XMEM_WORKING_SET_ALLnow works instead of returningFALSE.XMemGetFreePageStatisticsderives availability fromlimit − usedand keeps the 7-word shape the guest andpixrt10.dllconsume.history.rsanddiagnostics.rsread the same snapshot.Verification
python tuxbox.py check --no-gpu: 7/7 passed.xmem-partitionsgate passes, with the guest now asserting the 13,312 MiB limit and that the physical page count followsXMemAllocatePhysicalPages.tuxbox.py checkfirst reported 11 timeouts in thecpu,cpu-benchmark,presentandlanes-benchmarkgates. That run used the proton backend with parallel prefix batching while a game was running on the same machine. All 12 gates pass in isolation on this branch and onmainunder the same Proton GE prefix; the CPU gates were repeated three times per branch. The timeouts were contention, not this change, androute-game.exeimports onlyKERNEL32.dll.Deviations from the plan
13,955,973,120is 13,309.45 MiB). The code uses the documented 13,312 MiB,13,958,643,712.XMemTransferMemoryno longer changesGameLimit; the control and gate now assertbudget_stable=1.verify.pyregexes changed to match.Not covered
XMemVirtualAllocreservations and commits are not inused, so a title's largest buffers can still be missing fromGameUsed.Place::Card) is not counted; the console has one pool, the PC does not.STACK,KERNEL_POOL,TOOLSandCPU_PTEgroups are accepted but zero.lanes-selftestrow forruntime/xmemwas not run.Game-run evidence needed
A with/without run of the same title:
GameLimitandGameUsedfrom the provider, peak process RSS, and whether the world streams as before. The two runs differ only by this branch. No title launch was possible in this session.Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T18:32:15Z.
I'm in 2 minds about this.
Although it is "correct", it's not necessary; all games I've tested so far have stayed within the 13.5GB budget.
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T20:37:59Z.
Thanks. Reporting the console's 13,312 MiB budget instead of host RAM is the right model. Since the title sizes its streaming pools and caches from
GameLimit − GameUsed, this will change how much memory ProjectScarlett uses, possibly for the better. Before merging we need a game run with and without it: the reported numbers, peak process memory, and whether the world still streams in properly. If you can post that, great. Otherwise we'll run it here.