summaryrefslogtreecommitdiff
path: root/Documentation/core-api
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-09-24 11:09:35 +0300
committerMike Rapoport (Microsoft) <rppt@kernel.org>2026-09-24 11:09:35 +0300
commit091d47139cdb3b54269083345e3f884b2c16f8dd (patch)
treed2145e7658622a5c2c8e388c1e8e2518b9980118 /Documentation/core-api
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
parent8fe64603a47506c3b357002460c3a9c0d8d4d321 (diff)
downloadlinux-next-091d47139cdb3b54269083345e3f884b2c16f8dd.tar.gz
linux-next-091d47139cdb3b54269083345e3f884b2c16f8dd.zip
Merge patch series "kho: rename "scratch" to "bootmem""
Pratyush Yadav <pratyush@kernel.org> says: kho: rename "scratch" to "bootmem" From: "Pratyush Yadav (Google)" <pratyush@kernel.org> The term "KHO scratch" is vague and overloaded. It does not accurately describe what the memory is for. This was discussed previously at [0]. The conclusion was to rename "KHO scratch" to "KHO bootmem", since this is memory passed by the previous kernel for early boot allocations. In addition, memblock does not care about the provenance of the memory. It cares more about how it should use it. Use MEMBLOCK_KHO_NOPRSRV, instead of MEMBLOCK_KHO_SCRATCH, to describe this memory to memblock. This series does the renames. It also gets rid of a redundant Kconfig. While the diffstat is big and scary, most of the changes are mechanical. * patches from https://patch.msgid.link/20260922041321.233986-1-pratyush@kernel.org memblock: get rid of CONFIG_MEMBLOCK_KHO_SCRATCH memblock: rename KHO_SCRATCH to KHO_NOPRSRV kho: rename KHO scratch to KHO bootmem kho: rename kho_scratch= commandline parameter to kho_bootmem= Link: https://patch.msgid.link/20260922041321.233986-1-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'Documentation/core-api')
-rw-r--r--Documentation/core-api/kho/index.rst38
1 files changed, 19 insertions, 19 deletions
diff --git a/Documentation/core-api/kho/index.rst b/Documentation/core-api/kho/index.rst
index 320914a42178..e78a2bbe2be1 100644
--- a/Documentation/core-api/kho/index.rst
+++ b/Documentation/core-api/kho/index.rst
@@ -13,8 +13,8 @@ Kexec HandOver (KHO) is a mechanism that allows Linux to preserve memory
regions, which could contain serialized system states, across kexec.
KHO uses :ref:`flattened device tree (FDT) <kho_fdt>` to pass information about
-the preserved state from pre-exec kernel to post-kexec kernel and :ref:`scratch
-memory regions <kho_scratch>` to ensure integrity of the preserved memory.
+the preserved state from pre-exec kernel to post-kexec kernel and :ref:`boot
+memory regions <kho_bootmem>` to ensure integrity of the preserved memory.
.. _kho_fdt:
@@ -40,31 +40,31 @@ and post-kexec kernels. This ABI is defined by header files in
abi.rst
-.. _kho_scratch:
+.. _kho_bootmem:
-Scratch Regions
-===============
+Boot Memory Regions
+===================
To boot into kexec, we need to have a physically contiguous memory range that
contains no handed over memory. Kexec then places the target kernel and initrd
into that region. The new kernel exclusively uses this region for memory
allocations before during boot up to the initialization of the page allocator.
-We guarantee that we always have such regions through the scratch regions: On
-first boot KHO allocates several physically contiguous memory regions. Since
+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
-scratch region per NUMA node plus a scratch region to satisfy allocations
-requests that do not require particular NUMA node assignment.
-By default, size of the scratch region is calculated based on amount of memory
-allocated during boot. The ``kho_scratch`` kernel command line option may be
-used to explicitly define size of the scratch regions.
-The scratch 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 KHO kexec, we ignore the ``kho_scratch`` kernel command line option and
+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 KHO kexec, we ignore the ``kho_bootmem`` kernel command line option and
instead reuse the exact same region that was originally allocated. This allows
us to recursively execute any amount of KHO kexecs. Because we used this region
for boot memory allocations and as target memory for kexec blobs, some parts