Skip to contentSkip to conversation

kho: add support for linked-block serialization

PATCH New Pasha Tatashin 1 participant 1 message Jun 3 1 message not in the archive

Subsystems (5)
lore
Share & tools
lore

Pasha Tatashin

author maintainer
#1 lore raw

PATCH 7/13 kho: add support for linked-block serialization

In reply to a message not in the archive

Introduce a linked-block serialization mechanism for state handover.

Previously, LUO used contiguous memory blocks for serializing sessions and files, which imposed limits on the total number of items that could be preserved across a live update.

This commit adds the infrastructure for a more flexible, block-based approach where serialized data is stored in a chain of linked blocks. This is a generic KHO serialization block infrastructure that can be used by multiple subsystems.

---
 Documentation/core-api/kho/abi.rst   |   5 +
 Documentation/core-api/kho/index.rst |  11 +
 MAINTAINERS                          |   1 +
 include/linux/kho/abi/block.h        |  56 ++++
 include/linux/kho_block.h            | 106 +++++++
 kernel/liveupdate/Makefile           |   1 +
 kernel/liveupdate/kho_block.c        | 416 +++++++++++++++++++++++++++
 7 files changed, 596 insertions(+)
 create mode 100644 include/linux/kho/abi/block.h
 create mode 100644 include/linux/kho_block.h
 create mode 100644 kernel/liveupdate/kho_block.c
Documentation/core-api/kho/abi.rst +5 -0
index 799d743105a6..edeb5b311963 100644
@@ -28,6 +28,11 @@ KHO persistent memory tracker ABI
 .. kernel-doc:: include/linux/kho/abi/kexec_handover.h
   :doc: KHO persistent memory tracker
 
+KHO serialization block ABI
+===========================
+
+.. kernel-doc:: include/linux/kho/abi/block.h
+
 See Also
 ========
 
Documentation/core-api/kho/index.rst +11 -0
index 0a2dee4f8e7d..320914a42178 100644
@@ -83,6 +83,17 @@ Public API
 .. kernel-doc:: kernel/liveupdate/kexec_handover.c
   :export:
 
+KHO Serialization Blocks API
+============================
+
+.. kernel-doc:: kernel/liveupdate/kho_block.c
+  :doc: KHO Serialization Blocks
+
+.. kernel-doc:: include/linux/kho_block.h
+
+.. kernel-doc:: kernel/liveupdate/kho_block.c
+  :internal:
+
 See Also
 ========
 
MAINTAINERS +1 -0
index 9ec290e38b44..920ba7622afa 100644
@@ -14208,6 +14208,7 @@ F:	Documentation/admin-guide/mm/kho.rst
 F:	Documentation/core-api/kho/*
 F:	include/linux/kexec_handover.h
 F:	include/linux/kho/
+F:	include/linux/kho_block.h
 F:	kernel/liveupdate/kexec_handover*
 F:	lib/test_kho.c
 F:	tools/testing/selftests/kho/
include/linux/kho/abi/block.h new file +56 -0

56 lines not on this page · raw message

include/linux/kho_block.h new file +106 -0

106 lines not on this page · raw message

kernel/liveupdate/Makefile +1 -0
index d2f779cbe279..eec9d3ae07eb 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 luo-y :=								\
+		kho_block.o						\
 		luo_core.o						\
 		luo_file.o						\
 		luo_flb.o						\
kernel/liveupdate/kho_block.c new file +416 -0

416 lines not on this page · raw message

Signature · 1 line
2.53.0