mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 00:50:52 +00:00
* perf(libkernel): back flexible memory with a memfd on Linux * docs(debt): describe the flexible memory backing on Linux * fix(libkernel): keep flexible memory anonymous and host-imported when its memfd path fails * fix(libkernel): reject empty flexible backing queries and keep remainders when a hole punch fails * docs(debt): shorten the flexible memory backing entry and note a failed hole punch * fix(agc): discard a failed dma-buf import before its host-pointer retry
901 B
901 B
libkernel
add Functional
- On Linux, each flexible memory map is its own sealed memfd, mapped shared from the file offset equal to its address modulo 2 MiB and sized to a multiple of 64 MiB, so GPU imports take it through udmabuf like direct memory instead of a host-pointer buffer object. It is marked
MADV_HUGEPAGE, since shared memory gets huge pages only on request whereshmem_enabledisadvise. Unmapping part of a map punches that part out of the file; a live import keeps the old pages until released, and a failed punch leaves them until the file closes. If creating, sizing or mapping the memfd fails (for example at the descriptor limit), the map stays anonymous, as before. Plain anonymousmmapmemory still has no shared backing.