Skip to content

RFC Make KHO Stateless

Jason Miu kexec linux-mm lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4kho: Introduce KHO page table data structureskernel/kexec_handover.c+344 -05 replies
2/4kho: Adopt KHO page tables and remove serializationinclude/linux/kexec_handover.h kernel/kexec_handover.c+71 -4782 replies
3/4memblock: Remove KHO notifier usageinclude/linux/kexec_handover.h kernel/kexec_core.c kernel/kexec_handover.c +2 more+47 -580 replies
4/4kho: Remove notifier system infrastructureinclude/linux/kexec_handover.h kernel/kexec_handover.c+0 -350 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC v1 0/4] Make KHO Stateless

This series transitions KHO from an xarray-based metadata tracking system with serialization to using page table like data structures that can be passed directly to the next kernel.

The key motivations for this change are to:
- Eliminate the need for data serialization before kexec.
- Remove the former KHO state machine by deprecating the finalize and abort states.
- Pass preservation metadata more directly to the next kernel via the FDT.

The new approach uses a per-order page table structure (kho_order_table, kho_page_table, kho_bitmap_table) to mark preserved pages. The physical address of the root kho_order_table is passed in the FDT, allowing the next kernel to reconstruct the preserved memory map.

The series includes the following changes:
1. Introduce the KHO page table data structures.
2. Adopt the KHO page tables, remove the xarray-based tracking and the serialization/finalization code.
3. Update memblock to use direct KHO API calls, and adjust KHO FDT completion timing.
4. Remove the KHO notifier system infrastructure.

Jason Miu (4):
kho: Introduce KHO page table data structures
kho: Adopt KHO page tables and remove serialization
memblock: Remove KHO notifier usage
kho: Remove notifier system infrastructure

 include/linux/kexec_handover.h |  44 +-
 kernel/kexec_core.c            |   4 +
 kernel/kexec_handover.c        | 821 ++++++++++++++++-----------------
 kernel/kexec_internal.h        |   2 +
 mm/memblock.c                  |  46 +-
 5 files changed, 404 insertions(+), 513 deletions(-)
Signature · 1 line
2.51.0.384.g4c02a37b29-goog