perf(agc): keep a smaller staging pool on system-memory heaps #5893
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5893"
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 boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-14T14:49:39Z.
What
The staging pool's device tier (
BufferPool::DeviceBudget, #1147) retains up tomax(512 MiB, heap / 8)of idle buffers, sized from the largest device-local heap as if it were video memory. On an integrated GPU that heap is system RAM: 1.4 GiB of idle buffers on an Arc iGPU whose heap is 11.5 GiB, taken from the title.When every memory type of that heap is host-visible, which is how integrated GPUs report their memory and never true of a discrete GPU (it always has a device-only type), the tier now retains a sixty-fourth of the heap, at least 128 MiB: 180 MiB on that Arc. Discrete GPUs keep today's budget, and
APS5_STAGING_POOL_MIBstill overrides it.The storage image cache has the same problem (
max(2 GiB, heap / 4), 2.9 GiB there), but #5483 already changes that budget, so it is left to it.Tested
Fedora 44, GCC 16.2.1, Release, Intel Arc (Meteor Lake iGPU, Mesa 26.2.3 ANV), 15 GiB RAM.
cteston Arc and on lavapipe: 1158 of 1160 pass on both.agc_host_import_sparsefails on plainmainhere too.guest_kernel_fcntl, new onmain, aborted once in each full parallel run and passes alone (5 of 5) and with the 366guest_tests in parallel, on this branch and onmain.stagingPoolBudgetTestschecks a heap of host-visible types (16 GiB gives 256 MiB, 4 GiB the 128 MiB floor) and that one device-only type keeps the old budget.mainto get past its calibration on this iGPU (compute programs of 0.6 to 1.9 M SPIR-V words that ANV can't compile in time, see #4977 and #5405), so both runs usemain66f89476with #5405, #5181 and a local change that lets #5405's spanned waves run without a required subgroup size, with this commit, and the old budget forced throughAPS5_STAGING_POOL_MIB=1437for the comparison. The storage image cache is at itsmainsize in both. Enter is held once at 90 s, which leads through the main menu into loading, in a cgroup of 12 GiB RAM plus 4 GiB swap:APS5_TRACE_SECONDS=20:20. Frame p50 is 16.7 or 21.0 ms in both builds (one fast run each) and the cgroup peak is about 900 MiB in both. Summary lines (traces inevidence/unified-memory-budgets):The PR lines are from
0f58cb53b, the first form of this branch, which also shrank the storage image cache; Dreaming Sarah reaches neither budget.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by ee6aba54 on 2026-10-15T01:01:02Z.
#6174 changes
BufferPool::DeviceBudgetas well (it takes the reported memory budget into account). I will rebase it onto this one once merged; nothing to change here.