linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 00/22] Live Update Orchestrator
@ 2025-11-22 22:23 Pasha Tatashin
  2025-11-22 22:23 ` [PATCH v7 01/22] liveupdate: luo_core: " Pasha Tatashin
                   ` (22 more replies)
  0 siblings, 23 replies; 41+ messages in thread
From: Pasha Tatashin @ 2025-11-22 22:23 UTC (permalink / raw)
  To: pratyush, jasonmiu, graf, pasha.tatashin, rppt, dmatlack,
	rientjes, corbet, rdunlap, ilpo.jarvinen, kanie, ojeda, aliceryhl,
	masahiroy, akpm, tj, yoann.congal, mmaurer, roman.gushchin,
	chenridong, axboe, mark.rutland, jannh, vincent.guittot, hannes,
	dan.j.williams, david, joel.granados, rostedt, anna.schumaker,
	song, linux, linux-kernel, linux-doc, linux-mm, gregkh, tglx,
	mingo, bp, dave.hansen, x86, hpa, rafael, dakr,
	bartosz.golaszewski, cw00.choi, myungjoo.ham, yesanishhere,
	Jonathan.Cameron, quic_zijuhu, aleksander.lobakin, ira.weiny,
	andriy.shevchenko, leon, lukas, bhelgaas, wagi, djeffery,
	stuart.w.hayes, ptyadav, lennart, brauner, linux-api,
	linux-fsdevel, saeedm, ajayachandra, jgg, parav, leonro, witu,
	hughd, skhawaja, chrisl

This series introduces the Live Update Orchestrator, a kernel subsystem
designed to facilitate live kernel updates using a kexec-based reboot.
This capability is critical for cloud environments, allowing hypervisors
to be updated with minimal downtime for running virtual machines. LUO
achieves this by preserving the state of selected resources, such as
memory, devices and their dependencies, across the kernel transition.

As a key feature, this series includes support for preserving memfd file
descriptors, which allows critical in-memory data, such as guest RAM or
any other large memory region, to be maintained in RAM across the kexec
reboot.

The other series that use LUO, are VFIO [1], IOMMU [2], and PCI [3]
preservations.

Github repo of this series [4].

The core of LUO is a framework for managing the lifecycle of preserved
resources through a userspace-driven interface. Key features include:

- Session Management
  Userspace agent (i.e. luod [5]) creates named sessions, each
  represented by a file descriptor (via centralized agent that controls
  /dev/liveupdate). The lifecycle of all preserved resources within a
  session is tied to this FD, ensuring automatic kernel cleanup if the
  controlling userspace agent crashes or exits unexpectedly.

- File Preservation
  A handler-based framework allows specific file types (demonstrated
  here with memfd) to be preserved. Handlers manage the serialization,
  restoration, and lifecycle of their specific file types.

- File-Lifecycle-Bound State
  A new mechanism for managing shared global state whose lifecycle is
  tied to the preservation of one or more files. This is crucial for
  subsystems like IOMMU or HugeTLB, where multiple file descriptors may
  depend on a single, shared underlying resource that must be preserved
  only once.

- KHO Integration
  LUO drives the Kexec Handover framework programmatically to pass its
  serialized metadata to the next kernel. The LUO state is finalized and
  added to the kexec image just before the reboot is triggered. In the
  future this step will also be removed once stateless KHO is
  merged [6].

- Userspace Interface
  Control is provided via ioctl commands on /dev/liveupdate for creating
  and retrieving sessions, as well as on session file descriptors for
  managing individual files.

- Testing
  The series includes a set of selftests, including userspace API
  validation, kexec-based lifecycle tests for various session and file
  scenarios, and a new in-kernel test module to validate the FLB logic.

Changelog since v6 [7]
- Collected Reviewed-by tags from Mike Rapoport,
  Pratyush Yadav, and Zhu Yanjun. Addressed all outstanding comments.
- Moved ABI headers from include/linux/liveupdate/abi/ to
  include/linux/kho/abi/ to align with other future users of KHO and KHO
  itself.
- Separated internal APIs to allow kernel subsystems to preserve file
  objects programmatically.
- Introduced struct luo_file_set to manage groups of preserved files,
  decoupling this logic from the luo_session structure. This simplifies
  internal management and serialization.
- Implemented luo_session_quiesce() and luo_session_resume() mechanisms.
  These ensure that file handlers and FLBs can be safely unregistered
  (liveupdate_unregister_file_handler, liveupdate_unregister_flb) by
  preventing new operations while unregistration is in progress.
- Added a comprehensive test orchestration framework. This includes a
  custom init process (init.c) and scripts (luo_test.sh, run.sh) to
  automate kexec testing within QEMU environments across x86_64 and
  arm64.
 
[1] https://lore.kernel.org/all/20251018000713.677779-1-vipinsh@google.com/
[2] https://lore.kernel.org/linux-iommu/20250928190624.3735830-1-skhawaja@google.com
[3] https://lore.kernel.org/linux-pci/20250916-luo-pci-v2-0-c494053c3c08@kernel.org
[4] https://github.com/googleprodkernel/linux-liveupdate/tree/luo/v7
[5] https://tinyurl.com/luoddesign
[6] https://lore.kernel.org/all/20251020100306.2709352-1-jasonmiu@google.com
[7] https://lore.kernel.org/all/20251115233409.768044-1-pasha.tatashin@soleen.com

Pasha Tatashin (16):
  liveupdate: luo_core: Live Update Orchestrator
  liveupdate: luo_core: integrate with KHO
  kexec: call liveupdate_reboot() before kexec
  liveupdate: luo_session: add sessions support
  liveupdate: luo_core: add user interface
  liveupdate: luo_file: implement file systems callbacks
  liveupdate: luo_session: Add ioctls for file preservation
  docs: add luo documentation
  MAINTAINERS: add liveupdate entry
  selftests/liveupdate: Add userspace API selftests
  selftests/liveupdate: Add kexec-based selftest for
  selftests/liveupdate: Add kexec test for multiple and empty sessions
  selftests/liveupdate: add test infrastructure and scripts
  liveupdate: luo_file: Add internal APIs for file preservation
  liveupdate: luo_flb: Introduce File-Lifecycle-Bound global state
  tests/liveupdate: Add in-kernel liveupdate test

Pratyush Yadav (6):
  mm: shmem: use SHMEM_F_* flags instead of VM_* flags
  mm: shmem: allow freezing inode mapping
  mm: shmem: export some functions to internal.h
  liveupdate: luo_file: add private argument to store runtime state
  mm: memfd_luo: allow preserving memfd
  docs: add documentation for memfd preservation via LUO

 Documentation/core-api/index.rst              |   1 +
 Documentation/core-api/liveupdate.rst         |  71 ++
 Documentation/mm/index.rst                    |   1 +
 Documentation/mm/memfd_preservation.rst       |  23 +
 Documentation/userspace-api/index.rst         |   1 +
 .../userspace-api/ioctl/ioctl-number.rst      |   2 +
 Documentation/userspace-api/liveupdate.rst    |  20 +
 MAINTAINERS                                   |  16 +
 include/linux/kho/abi/luo.h                   | 243 +++++
 include/linux/kho/abi/memfd.h                 |  77 ++
 include/linux/liveupdate.h                    | 311 ++++++
 include/linux/shmem_fs.h                      |  23 +
 include/uapi/linux/liveupdate.h               | 216 ++++
 kernel/kexec_core.c                           |   5 +
 kernel/liveupdate/Kconfig                     |  27 +
 kernel/liveupdate/Makefile                    |   8 +
 kernel/liveupdate/luo_core.c                  | 454 ++++++++
 kernel/liveupdate/luo_file.c                  | 987 ++++++++++++++++++
 kernel/liveupdate/luo_flb.c                   | 701 +++++++++++++
 kernel/liveupdate/luo_internal.h              | 141 +++
 kernel/liveupdate/luo_session.c               | 645 ++++++++++++
 lib/Kconfig.debug                             |  23 +
 lib/tests/Makefile                            |   1 +
 lib/tests/liveupdate.c                        | 160 +++
 mm/Makefile                                   |   1 +
 mm/internal.h                                 |   6 +
 mm/memfd_luo.c                                | 517 +++++++++
 mm/shmem.c                                    |  57 +-
 tools/testing/selftests/Makefile              |   1 +
 tools/testing/selftests/liveupdate/.gitignore |   9 +
 tools/testing/selftests/liveupdate/Makefile   |  34 +
 tools/testing/selftests/liveupdate/config     |  11 +
 .../testing/selftests/liveupdate/do_kexec.sh  |  16 +
 tools/testing/selftests/liveupdate/init.c     | 174 +++
 .../testing/selftests/liveupdate/liveupdate.c | 348 ++++++
 .../selftests/liveupdate/luo_kexec_simple.c   |  89 ++
 .../selftests/liveupdate/luo_multi_session.c  | 162 +++
 .../testing/selftests/liveupdate/luo_test.sh  | 296 ++++++
 .../selftests/liveupdate/luo_test_utils.c     | 266 +++++
 .../selftests/liveupdate/luo_test_utils.h     |  44 +
 tools/testing/selftests/liveupdate/run.sh     |  68 ++
 41 files changed, 6235 insertions(+), 21 deletions(-)
 create mode 100644 Documentation/core-api/liveupdate.rst
 create mode 100644 Documentation/mm/memfd_preservation.rst
 create mode 100644 Documentation/userspace-api/liveupdate.rst
 create mode 100644 include/linux/kho/abi/luo.h
 create mode 100644 include/linux/kho/abi/memfd.h
 create mode 100644 include/linux/liveupdate.h
 create mode 100644 include/uapi/linux/liveupdate.h
 create mode 100644 kernel/liveupdate/luo_core.c
 create mode 100644 kernel/liveupdate/luo_file.c
 create mode 100644 kernel/liveupdate/luo_flb.c
 create mode 100644 kernel/liveupdate/luo_internal.h
 create mode 100644 kernel/liveupdate/luo_session.c
 create mode 100644 lib/tests/liveupdate.c
 create mode 100644 mm/memfd_luo.c
 create mode 100644 tools/testing/selftests/liveupdate/.gitignore
 create mode 100644 tools/testing/selftests/liveupdate/Makefile
 create mode 100644 tools/testing/selftests/liveupdate/config
 create mode 100755 tools/testing/selftests/liveupdate/do_kexec.sh
 create mode 100644 tools/testing/selftests/liveupdate/init.c
 create mode 100644 tools/testing/selftests/liveupdate/liveupdate.c
 create mode 100644 tools/testing/selftests/liveupdate/luo_kexec_simple.c
 create mode 100644 tools/testing/selftests/liveupdate/luo_multi_session.c
 create mode 100755 tools/testing/selftests/liveupdate/luo_test.sh
 create mode 100644 tools/testing/selftests/liveupdate/luo_test_utils.c
 create mode 100644 tools/testing/selftests/liveupdate/luo_test_utils.h
 create mode 100755 tools/testing/selftests/liveupdate/run.sh


base-commit: 2cb7e27ffe3e3e1d8a837026462ebca22cba3b4f
-- 
2.52.0.rc2.455.g230fcf2819-goog


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

end of thread, other threads:[~2025-11-23 19:43 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-22 22:23 [PATCH v7 00/22] Live Update Orchestrator Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 01/22] liveupdate: luo_core: " Pasha Tatashin
2025-11-23 11:12   ` Mike Rapoport
2025-11-23 12:15     ` Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 02/22] liveupdate: luo_core: integrate with KHO Pasha Tatashin
2025-11-23 11:27   ` Mike Rapoport
2025-11-23 12:03     ` Pasha Tatashin
2025-11-23 14:16       ` Mike Rapoport
2025-11-23 18:23         ` Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 03/22] kexec: call liveupdate_reboot() before kexec Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 04/22] liveupdate: luo_session: add sessions support Pasha Tatashin
2025-11-23 14:16   ` Mike Rapoport
2025-11-23 19:07     ` Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 05/22] liveupdate: luo_core: add user interface Pasha Tatashin
2025-11-23 14:19   ` Mike Rapoport
2025-11-23 19:25     ` Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 06/22] liveupdate: luo_file: implement file systems callbacks Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 07/22] liveupdate: luo_session: Add ioctls for file preservation Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 08/22] docs: add luo documentation Pasha Tatashin
2025-11-23 16:05   ` Mike Rapoport
2025-11-23 19:29     ` Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 09/22] MAINTAINERS: add liveupdate entry Pasha Tatashin
2025-11-23 15:29   ` Mike Rapoport
2025-11-22 22:23 ` [PATCH v7 10/22] mm: shmem: use SHMEM_F_* flags instead of VM_* flags Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 11/22] mm: shmem: allow freezing inode mapping Pasha Tatashin
2025-11-23 15:29   ` Mike Rapoport
2025-11-23 19:43     ` Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 12/22] mm: shmem: export some functions to internal.h Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 13/22] liveupdate: luo_file: add private argument to store runtime state Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 14/22] mm: memfd_luo: allow preserving memfd Pasha Tatashin
2025-11-23 15:47   ` Mike Rapoport
2025-11-22 22:23 ` [PATCH v7 15/22] docs: add documentation for memfd preservation via LUO Pasha Tatashin
2025-11-23 16:07   ` Mike Rapoport
2025-11-22 22:23 ` [PATCH v7 16/22] selftests/liveupdate: Add userspace API selftests Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 17/22] selftests/liveupdate: Add kexec-based selftest for Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 18/22] selftests/liveupdate: Add kexec test for multiple and empty sessions Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 19/22] selftests/liveupdate: add test infrastructure and scripts Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 20/22] liveupdate: luo_file: Add internal APIs for file preservation Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 21/22] liveupdate: luo_flb: Introduce File-Lifecycle-Bound global state Pasha Tatashin
2025-11-22 22:23 ` [PATCH v7 22/22] tests/liveupdate: Add in-kernel liveupdate test Pasha Tatashin
2025-11-22 22:44 ` [PATCH v7 00/22] Live Update Orchestrator Andrew Morton

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