Posted to the Linux kernel mailing list on Wednesday was a new patch series called "Extmem" as a new NUMA-aware boot memory carving solution. Extmem aims to help with specialized Linux server uses where large portions of RAM may be carved out at boot time for use by VMs, DAX devices, and other driver-managed memory pool needs. Google's pursuit with Extmem is believing its better than current options for doing so: "Many server workloads need a portable, NUMA-aware way to carve out large aligned regions of DRAM at boot -- keeping only a modest pool of System RAM per NUMA node for the host kernel while handing the rest off to external memory consumers outside the buddy allocator and boot vmemmap. Common use cases include character DAX (/dev/daxX.Y) backing guest VMs across KHO live updates, /dev/pmemX block devices backing fsdax filesystems, and other driver-managed memory pools. Today there is no portable way to establish that split at boot across x86_64 and arm64: - EFI_MEMORY_SP ("Soft Reserved") requires per-host firmware setup, is absent on arm64 DeviceTree, and defaults in dax_hmem to routing via dax_kmem (where onlining overwrites backed VM memory across KHO kexec). - memmap=nn!ss is x86-only and ignores NUMA topology and firmware holes. For example, booting a 2-node x86_64 host (512 GiB total, 256 GiB per node) with memmap=448G!64G leaves NUMA node 1 with 0 kB of System RAM. - cma=, hugetlb_cma=, and reserve_mem= keep pages in System RAM, paying ~16 MiB/GiB of boot struct page arrays upfront and preventing ZONE_DEVICE or driver-managed attachment. - Runtime memory offlining cannot guarantee 1 GiB physical contiguity after early allocations (and boot RAM cannot be offlined on arm64). ... The idea of extmem= is a software-defined, NUMA-aware counterpart to EFI Soft Reserved memory that feeds existing DAX and libnvdimm drivers rather than introducing a workload-specific allocator." Those wishing to learn more about Extmem can do so via the patch series cover letter. Where Extmem goes from here isn't immediately clear. The current patches rely on specifying the memory carve-outs using a boot parameter while some kernel developers feel this isn't the right approach. A point was also raised that this is "special+weird core-mm infrastructure" for the Kernel HandOver (KHO) work by Google, and another LKML message also not sure if this is the right solution.
Google Engineers Exploring "Extmem" For Linux NUMA-Aware Boot Memory Carving
Full Article
Original Source
Read the full article at Phoronix →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.