Re: [RFC PATCH 00/11] mm: NUMA-aware boot memory carving (extmem)

From: David Hildenbrand (Arm)

Date: Wed Dec 02 2026 - 10:11:01 EST


On 12/2/26 15:45, Mike Rapoport wrote:
> Hi Suseendran,
>
> On Wed, Dec 02, 2026 at 12:19:35AM +0000, Suseendran Bhaskaran wrote:
>> 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).
>>
>> Design
>> ------
>> This series adds CONFIG_EXTMEM and a single boot parameter:
>> extmem=[<nid>|all:]<size|max>[:<align>][:keep=<size>][,...]
>>
>> <nid>|all target node, every node with RAM, or any node if omitted
>> <size|max> bytes to carve (multiple of <align>), or "max" for all
>> available aligned RAM above 4 GiB and keep=<size>
>> <align> power-of-two alignment >= section size (default: 128M on
>> 4K/16K pages, 512M on 64K pages)
>> keep=<size> minimum System RAM to leave uncarved on the target node(s)
>
> I agree that we need a generic way to define memory carve-outs, but I doubt
> that a command line parameter is the way to go.

+1

And I am also not convinced that we want more of special+weird core-mm
infrastructure KHO for ("mm/extmem: preserve carved regions across KHO kexec").

--
Cheers,

David