|
|
Log in / Subscribe / Register

Make KHO Stateless

From:  Jason Miu <jasonmiu-AT-google.com>
To:  Alexander Graf <graf-AT-amazon.com>, Andrew Morton <akpm-AT-linux-foundation.org>, Baoquan He <bhe-AT-redhat.com>, Changyuan Lyu <changyuanl-AT-google.com>, David Matlack <dmatlack-AT-google.com>, David Rientjes <rientjes-AT-google.com>, Jason Gunthorpe <jgg-AT-nvidia.com>, Jason Miu <jasonmiu-AT-google.com>, Joel Granados <joel.granados-AT-kernel.org>, Marcos Paulo de Souza <mpdesouza-AT-suse.com>, Mario Limonciello <mario.limonciello-AT-amd.com>, Mike Rapoport <rppt-AT-kernel.org>, Pasha Tatashin <pasha.tatashin-AT-soleen.com>, Petr Mladek <pmladek-AT-suse.com>, "Rafael J . Wysocki" <rafael.j.wysocki-AT-intel.com>, Steven Chen <chenste-AT-linux.microsoft.com>, Yan Zhao <yan.y.zhao-AT-intel.com>, kexec-AT-lists.infradead.org, linux-kernel-AT-vger.kernel.org, linux-mm-AT-kvack.org
Subject:  [RFC v1 0/4] Make KHO Stateless
Date:  Tue, 16 Sep 2025 19:50:15 -0700
Message-ID:  <20250917025019.1585041-1-jasonmiu@google.com>
Archive-link:  Article

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(-)

-- 
2.51.0.384.g4c02a37b29-goog




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds