[RFC PATCH 00/11] mm: NUMA-aware boot memory carving (extmem)
Suseendran Bhaskaran
suseendranb at google.com
Wed Dec 2 16:24:37 PST 2026
Hi Mike, David,
Thanks for taking a look and sharing your feedback.
On Wed, Dec 02, 2026 at 04:45:24PM +0200, Mike Rapoport wrote:
> 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.
The primary requirements I am trying to address are:
1. An arch-agnostic way to carve out memory across ACPI x86_64,
ACPI arm64, and DT arm64 without per-host firmware changes.
2. NUMA-aware carving without hardcoding machine-specific physical
addresses or firmware holes.
3. Preserving the exact carved ranges across KHO kexec.
Specifying the carveout via the kernel command line was the most
straightforward way I could see to satisfy those across both ACPI and
DT platforms. If you have a different mechanism in mind, I would be
glad to hear it and explore that direction.
> That sounds backwards to me. These ranges should not be mapped from
> the start.
Agree that not mapping them in the first place would be much cleaner.
Because init_mem_mapping() (x86_64) and paging_init() (arm64) currently
run before NUMA discovery (ACPI SRAT / DT), carving per-node in the
kernel meant RAM was already mapped and had to be unmapped pre-SMP.
Please let me know if there is a cleaner way to avoid mapping them from
the start (for example, parsing NUMA topology before setting up the
direct map, if that's an option).
On Wed, Dec 02, 2026 at 04:10:37PM +0100, David Hildenbrand (Arm) wrote:
> 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").
The motivation here is live-updating hosts where carved regions back
running VMs and the exact same physical ranges and contents must survive
KHO kexec.
Existing KHO preservation mechanisms (reserve_mem= and
kho_preserve_pages()) operate on System RAM tracked in memblock.memory
with boot struct page arrays, whereas carved external regions are
removed from memblock.memory before struct page allocation. Because cold
boot specifies sizes rather than fixed physical addresses, Patch 11
saves the resolved region descriptors in a KHO subtree so the next
kernel revives the exact same ranges.
If there is a cleaner way to preserve those resolved ranges across kexec
without adding KHO support to core mm, I would be happy to explore it.
Thanks,
Suseendran
More information about the linux-arm-kernel
mailing list