Re: [PATCH v3 5/5] kho: docs: update description of bootmem regions
From: Mukesh Pilaniya
Date: Fri Nov 13 2026 - 14:02:41 EST
On 12/11/26 4:08 pm, Mike Rapoport (Microsoft) wrote:
> The description of the boot memory regions does not mention the low
> memory region and claims there is always a region per node plus a global
> region, while the low memory and the global regions are not allocated
> when they would be empty.
>
> List all types of the boot memory regions and describe when they are not
> allocated.
>
> While on it, fix grammar and split the description of the regions size
> and of the CMA usage into separate paragraphs.
>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> ---
> Documentation/core-api/kho/index.rst | 31 ++++++++++++++++++++-----------
> 1 file changed, 20 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/core-api/kho/index.rst b/Documentation/core-api/kho/index.rst
> index e78a2bbe2be1d..ce2bf9cf66514 100644
> --- a/Documentation/core-api/kho/index.rst
> +++ b/Documentation/core-api/kho/index.rst
> @@ -52,17 +52,26 @@ allocations before during boot up to the initialization of the page allocator.
>
> We guarantee that we always have such regions through the boot memory regions:
> On first boot KHO allocates several physically contiguous memory regions. Since
> -after kexec these regions will be used by early memory allocations, there is a
> -boot memory region per NUMA node plus a boot memory region to satisfy
> -allocations requests that do not require particular NUMA node assignment. By
> -default, size of the boot memory region is calculated based on amount of memory
> -allocated during boot. The ``kho_bootmem`` kernel command line option may be
> -used to explicitly define size of the boot memory regions. The boot memory
> -regions are declared as CMA when page allocator is initialized so that their
> -memory can be used during system lifetime. CMA gives us the guarantee that no
> -handover pages land in that region, because handover pages must be at a static
> -physical memory location and CMA enforces that only movable pages can be located
> -inside.
> +after kexec these regions will be used by early memory allocations, there are
> +several types of such regions to ensure that all boot-time allocations work:
> +
> +* a low memory region for allocations below ``ARCH_LOW_ADDRESS_LIMIT``
> +* a region per NUMA node
> +* a global region for allocations that do not require a particular NUMA node
> +
> +Regions that would be empty are not allocated. For example, there is no low
> +memory region when ``ARCH_LOW_ADDRESS_LIMIT`` covers all memory, and there is
> +no global region when ``CONFIG_NUMA`` is disabled.
> +
> +By default, the size of the boot memory regions is calculated based on the
> +amount of memory allocated during boot. The ``kho_bootmem`` kernel command line
> +option may be used to explicitly define the size of the boot memory regions.
> +
> +The boot memory regions are declared as CMA when the page allocator is
> +initialized so that their memory can be used during system lifetime. CMA gives
> +us the guarantee that no handover pages land in that region, because handover
> +pages must be at a static physical memory location and CMA enforces that only
> +movable pages can be located inside.
>
> After KHO kexec, we ignore the ``kho_bootmem`` kernel command line option and
> instead reuse the exact same region that was originally allocated. This allows
>
Reviewed-by: Mukesh Pilaniya <mpilaniy@xxxxxxxxxx>
--
Regards,
Mukesh Pilaniya