linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv7 0/7] liveupdate: Rework KHO for in-kernel users
@ 2025-10-22  0:57 Pasha Tatashin
  2025-10-22  0:57 ` [PATCHv7 1/7] kho: allow to drive kho from within kernel Pasha Tatashin
                   ` (6 more replies)
  0 siblings, 7 replies; 29+ messages in thread
From: Pasha Tatashin @ 2025-10-22  0:57 UTC (permalink / raw)
  To: akpm, brauner, corbet, graf, jgg, linux-kernel, linux-kselftest,
	linux-mm, masahiroy, ojeda, pasha.tatashin, pratyush, rdunlap,
	rppt, tj

These patches are taken from the LUOv4 series [1] and address recent
comments from Pratyush.

They apply onto mm/mm-nonmm-unstable.

This series refactors the KHO framework to better support in-kernel
users like the upcoming LUO. The current design, which relies on a
notifier chain and debugfs for control, is too restrictive for direct
programmatic use.

The core of this rework is the removal of the notifier chain in favor of
a direct registration API. This decouples clients from the shutdown-time
finalization sequence, allowing them to manage their preserved state
more flexibly and at any time.

In support of this new model, this series also:
 - Exports kho_finalize() and kho_abort() for programmatic control.
 - Makes the debugfs interface optional.
 - Introduces APIs to unpreserve memory and fixes a bug in the abort
   path where client state was being incorrectly discarded. Note that
   this is an interim step, as a more comprehensive fix is planned as
   part of the stateless KHO work [2].
 - Moves all KHO code into a new kernel/liveupdate/ directory to
   consolidate live update components.

[1] https://lore.kernel.org/all/20250929010321.3462457-1-pasha.tatashin@soleen.com
[2] https://lore.kernel.org/all/20251001011941.1513050-1-jasonmiu@google.com

Mike Rapoport (Microsoft) (1):
  kho: drop notifiers

Pasha Tatashin (6):
  kho: allow to drive kho from within kernel
  kho: make debugfs interface optional
  kho: add interfaces to unpreserve folios and page ranges
  kho: don't unpreserve memory during abort
  liveupdate: kho: move to kernel/liveupdate
  liveupdate: kho: move kho debugfs directory to liveupdate

 Documentation/core-api/kho/concepts.rst       |   2 +-
 MAINTAINERS                                   |   3 +-
 include/linux/kexec_handover.h                |  53 +-
 init/Kconfig                                  |   2 +
 kernel/Kconfig.kexec                          |  24 -
 kernel/Makefile                               |   3 +-
 kernel/kexec_handover_internal.h              |  16 -
 kernel/liveupdate/Kconfig                     |  39 ++
 kernel/liveupdate/Makefile                    |   5 +
 kernel/{ => liveupdate}/kexec_handover.c      | 513 +++++++-----------
 .../{ => liveupdate}/kexec_handover_debug.c   |   0
 kernel/liveupdate/kexec_handover_debugfs.c    | 219 ++++++++
 kernel/liveupdate/kexec_handover_internal.h   |  56 ++
 lib/test_kho.c                                |  30 +-
 mm/memblock.c                                 |  62 +--
 tools/testing/selftests/kho/init.c            |   2 +-
 tools/testing/selftests/kho/vmtest.sh         |   1 +
 17 files changed, 576 insertions(+), 454 deletions(-)
 delete mode 100644 kernel/kexec_handover_internal.h
 create mode 100644 kernel/liveupdate/Kconfig
 create mode 100644 kernel/liveupdate/Makefile
 rename kernel/{ => liveupdate}/kexec_handover.c (80%)
 rename kernel/{ => liveupdate}/kexec_handover_debug.c (100%)
 create mode 100644 kernel/liveupdate/kexec_handover_debugfs.c
 create mode 100644 kernel/liveupdate/kexec_handover_internal.h


base-commit: 4d90027271cfa0d89473d1e288af52fda9a74935
-- 
2.51.0.915.g61a8936c21-goog



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2025-10-24 16:32 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-22  0:57 [PATCHv7 0/7] liveupdate: Rework KHO for in-kernel users Pasha Tatashin
2025-10-22  0:57 ` [PATCHv7 1/7] kho: allow to drive kho from within kernel Pasha Tatashin
2025-10-23  7:13   ` Mike Rapoport
2025-10-22  0:57 ` [PATCHv7 2/7] kho: make debugfs interface optional Pasha Tatashin
2025-10-22 10:31   ` Pratyush Yadav
2025-10-22  0:57 ` [PATCHv7 3/7] kho: drop notifiers Pasha Tatashin
2025-10-22 11:01   ` Pratyush Yadav
2025-10-24  6:16     ` Mike Rapoport
2025-10-24  9:39       ` Pratyush Yadav
2025-10-24 13:11     ` Pasha Tatashin
2025-10-24 15:50       ` Pratyush Yadav
2025-10-24 15:52         ` Pratyush Yadav
2025-10-24 16:15           ` Pasha Tatashin
2025-10-24 16:32             ` Pratyush Yadav
2025-10-22  0:57 ` [PATCHv7 4/7] kho: add interfaces to unpreserve folios and page ranges Pasha Tatashin
2025-10-22 11:10   ` Pratyush Yadav
2025-10-24 13:18     ` Pasha Tatashin
2025-10-23  7:17   ` Mike Rapoport
2025-10-22  0:57 ` [PATCHv7 5/7] kho: don't unpreserve memory during abort Pasha Tatashin
2025-10-22 11:15   ` Pratyush Yadav
2025-10-23  7:20     ` Mike Rapoport
2025-10-24 13:28       ` Pasha Tatashin
2025-10-24 15:27         ` Pratyush Yadav
2025-10-24 15:33           ` Pasha Tatashin
2025-10-24 15:48             ` Pratyush Yadav
2025-10-22  0:57 ` [PATCHv7 6/7] liveupdate: kho: move to kernel/liveupdate Pasha Tatashin
2025-10-22  0:57 ` [PATCHv7 7/7] liveupdate: kho: move kho debugfs directory to liveupdate Pasha Tatashin
2025-10-23  7:32   ` Mike Rapoport
2025-10-24 13:33     ` Pasha Tatashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox