From: Jason Miu <jasonmiu@google.com>
To: Alexander Graf <graf@amazon.com>,
Andrew Morton <akpm@linux-foundation.org>,
Baoquan He <bhe@redhat.com>,
Changyuan Lyu <changyuanl@google.com>,
David Matlack <dmatlack@google.com>,
David Rientjes <rientjes@google.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Jason Miu <jasonmiu@google.com>, Mike Rapoport <rppt@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Pratyush Yadav <pratyush@kernel.org>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [PATCH v2 0/3] Make KHO Stateless
Date: Mon, 20 Oct 2025 03:03:03 -0700 [thread overview]
Message-ID: <20251020100306.2709352-1-jasonmiu@google.com> (raw)
This series transitions KHO from an xarray-based metadata tracking system
with serialization to using a radix tree data structure 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 radix tree to mark preserved pages. A page's
physical address and its order are encoded into a single value. The tree
is composed of multiple levels of page-sized tables, with leaf nodes
being bitmap tables where each set bit represents a preserved page. The
physical address of the radix tree's root is passed in the FDT, allowing
the next kernel to reconstruct the preserved memory map.
The series includes the following changes:
1. kho: Adopt KHO radix tree data structures: Replaces the xarray-based
tracker with the new radix tree implementation and removes the
serialization/finalization code, thereby eliminating the KHO finalize
and abort states.
2. memblock: Remove KHO notifier usage: Decouples the memblock subsystem
from the KHO notifier system, switching it to use direct KHO API calls
and adjusting KHO FDT completion timing. KHO selftest is also updated
along with the APIs change.
3. kho: Remove notifier system infrastructure: Removes the now-unused
notifier infrastructure from the KHO core.
---
Changes in v2:
- The radix tree now uses 0-based level numbering (previously 1-based).
- Added a new public API: `kho_remove_subtree()` for clients to remove an FDT subtree.
- The output FDT is now protected by a mutex.
- FDT properties have been moved to a new header: `include/linux/live_update/abi/kexec_handover.h`.
- The KHO selftest has been updated.
---
Jason Miu (3):
kho: Adopt KHO radix tree data structures
memblock: kho: Remove KHO notifier usage
kho: Remove notifier system infrastructure
include/linux/kexec_handover.h | 42 +-
.../linux/live_update/abi/kexec_handover.h | 10 +
kernel/kexec_handover.c | 869 +++++++++---------
lib/test_kho.c | 28 +-
mm/memblock.c | 45 +-
tools/testing/selftests/kho/init.c | 19 -
6 files changed, 464 insertions(+), 549 deletions(-)
create mode 100644 include/linux/live_update/abi/kexec_handover.h
--
2.51.0.858.gf9c4a03a3a-goog
next reply other threads:[~2025-10-20 10:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 10:03 Jason Miu [this message]
2025-10-20 10:03 ` [PATCH v2 1/3] kho: Adopt KHO radix tree data structures Jason Miu
2025-10-22 15:51 ` David Matlack
2025-10-23 0:51 ` Jason Miu
2025-10-23 17:43 ` Jason Gunthorpe
2025-10-23 23:45 ` Jason Gunthorpe
2025-10-24 1:23 ` Pasha Tatashin
2025-10-24 11:43 ` Jason Gunthorpe
2025-10-27 11:53 ` Mike Rapoport
2025-10-20 10:03 ` [PATCH v2 2/3] memblock: kho: Remove KHO notifier usage Jason Miu
2025-10-20 10:03 ` [PATCH v2 3/3] kho: Remove notifier system infrastructure Jason Miu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251020100306.2709352-1-jasonmiu@google.com \
--to=jasonmiu@google.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=changyuanl@google.com \
--cc=dmatlack@google.com \
--cc=graf@amazon.com \
--cc=jgg@nvidia.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).