[PATCH] kho: do not reserve empty per-node bootmem areas

Pratyush Yadav pratyush at kernel.org
Thu Oct 15 04:08:59 PDT 2026


On Thu, Oct 15 2026, Mike Rapoport wrote:

> On Wed, Oct 14, 2026 at 03:15:44PM +0200, Pratyush Yadav wrote:
>> From: "Pratyush Yadav (Google)" <pratyush at kernel.org>
>> 
>> Some nodes do not allocate any early boot memory. An example is
>> hotpluggable nodes with movable_node enabled. So the scratch size for
>
>                           Let's use the new naming please ^ ;-)

Argh, muscle memory...

>
> I'll fix it up when applying.

Thanks!

>
>> them ends up being zero. Zero size allocations normally don't play well
>> with memblock. Memblock returns an address, but then doesn't actually
>> reserve anything. This address ends up being recorded in kho_bootmem
>> with a size of 0. In case of hotpluggable nodes with movable_nodes, the
>> allocation on the node actually fails because memblock refuses to
>> allocate there, and so KHO fails to initialize.
>> 
>> Skip bootmem reservation for such nodes entirely.
>> 
>> To keep the code more robust, avoid overloading kho_bootmem_cnt. use
>> max_nr_bootmem to store the size of kho_bootmem array. This ensures that
>> the location of kho_bootmem_cnt assignment does not affect the cleanup
>> paths.
[...]

-- 
Regards,
Pratyush Yadav



More information about the kexec mailing list