Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/13] liveupdate: Remove limits on sessions and files
@ 2026-06-02  3:17 Pasha Tatashin
  2026-06-02  3:17 ` [PATCH v5 01/13] liveupdate: change file_set->count type to u64 for type safety Pasha Tatashin
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Pasha Tatashin @ 2026-06-02  3:17 UTC (permalink / raw)
  To: linux-kselftest, rppt, shuah, akpm, linux-mm, skhan, linux-doc,
	linux-kernel, corbet, pasha.tatashin, dmatlack, kexec, pratyush,
	skhawaja, graf

Hi all,

This series removes the fixed limits on the number of files that can
be preserved within a single session, and the total number of sessions
managed by the Live Update Orchestrator (LUO).

The core of the change is a transition from single contiguous memory
blocks for metadata serialization to a chain of linked blocks. This
allows LUO to scale dynamically.

1.  ABI Evolution:
    - Introduced linked-block headers for both file and session
      serialization.
    - Bumped session ABI version to v4.

2.  Memory Management & Security:
    - Implemented a dynamic block allocation and reuse strategy. Blocks
      are allocated only when existing ones are exhausted and are reused
      during session/file removal cycles.
    - Introduced KHO_MAX_BLOCKS (10000) as a safeguard against stupid
      excessive allocations or corrupted cyclic lists during restore.

3.  Expanded Selftests:
    - Added new kexec-based tests verifying preservation of
      2000 sessions and 500 files per session.
    - Added self-tests for many sessions and many files management.

Tree: git.kernel.org/pub/scm/linux/kernel/git/tatashin/linux.git
Branch: luo-remove-max-files-sessions-limits/v5

Changes v5:
- Addressed comments from Pratyush:
  - Renamed kho_block_restore -> kho_block_set_restore, kho_block_destroy -> kho_block_set_destroy.
  - Renamed block iterator next/read functions to reserve_entry/read_entry.
  - Added public helpers kho_block_set_head_pa() and kho_block_set_is_empty().
  - Added validation to treat zero-count blocks as errors during restoration.
  - Simplified block iterator reading loop from a while to an if statement.
  - Changed standard WARN_ON macros to WARN_ON_ONCE on iterator allocation checks, and added warning details.
  - Simplified session serialization by removing a redundant NULL check on sessions_pa.

Please review.

Thanks,
Pasha

Pasha Tatashin (13):
  liveupdate: change file_set->count type to u64 for type safety
  liveupdate: avoid mixing cleanup guards with goto in
    luo_session_retrieve_fd
  liveupdate: centralize state management into struct luo_ser
  liveupdate: register luo_ser as KHO subtree
  liveupdate: Extract luo_file_deserialize_one helper
  liveupdate: Extract luo_session_deserialize_one helper
  kho: add support for linked-block serialization
  liveupdate: defer session block allocation and PA setting
  liveupdate: Remove limit on the number of sessions
  liveupdate: Remove limit on the number of files per session
  selftests/liveupdate: Test session and file limit removal
  selftests/liveupdate: Add stress-sessions kexec test
  selftests/liveupdate: Add stress-files kexec test

 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/abi/luo.h                   | 149 ++-----
 include/linux/kho_block.h                     | 101 +++++
 kernel/liveupdate/Makefile                    |   1 +
 kernel/liveupdate/kho_block.c                 | 390 ++++++++++++++++++
 kernel/liveupdate/luo_core.c                  |  99 ++---
 kernel/liveupdate/luo_file.c                  | 206 ++++-----
 kernel/liveupdate/luo_flb.c                   |  65 +--
 kernel/liveupdate/luo_internal.h              |  16 +-
 kernel/liveupdate/luo_session.c               | 241 +++++------
 tools/testing/selftests/liveupdate/Makefile   |   2 +
 .../testing/selftests/liveupdate/liveupdate.c |  75 ++++
 .../selftests/liveupdate/luo_stress_files.c   |  97 +++++
 .../liveupdate/luo_stress_sessions.c          | 102 +++++
 .../selftests/liveupdate/luo_test_utils.c     |  24 ++
 .../selftests/liveupdate/luo_test_utils.h     |   2 +
 19 files changed, 1184 insertions(+), 459 deletions(-)
 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
 create mode 100644 tools/testing/selftests/liveupdate/luo_stress_files.c
 create mode 100644 tools/testing/selftests/liveupdate/luo_stress_sessions.c


base-commit: 2935777b418d2bfcbfe96705bb2c0fa6c0d94e18
-- 
2.53.0



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

end of thread, other threads:[~2026-06-02 17:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02  3:17 [PATCH v5 00/13] liveupdate: Remove limits on sessions and files Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 01/13] liveupdate: change file_set->count type to u64 for type safety Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 02/13] liveupdate: avoid mixing cleanup guards with goto in luo_session_retrieve_fd Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 03/13] liveupdate: centralize state management into struct luo_ser Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 04/13] liveupdate: register luo_ser as KHO subtree Pasha Tatashin
2026-06-02 17:02   ` Pratyush Yadav
2026-06-02  3:17 ` [PATCH v5 05/13] liveupdate: Extract luo_file_deserialize_one helper Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 06/13] liveupdate: Extract luo_session_deserialize_one helper Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 07/13] kho: add support for linked-block serialization Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 08/13] liveupdate: defer session block allocation and PA setting Pasha Tatashin
2026-06-02 17:06   ` Pratyush Yadav
2026-06-02  3:17 ` [PATCH v5 09/13] liveupdate: Remove limit on the number of sessions Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 10/13] liveupdate: Remove limit on the number of files per session Pasha Tatashin
2026-06-02 17:07   ` Pratyush Yadav
2026-06-02  3:17 ` [PATCH v5 11/13] selftests/liveupdate: Test session and file limit removal Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 12/13] selftests/liveupdate: Add stress-sessions kexec test Pasha Tatashin
2026-06-02  3:17 ` [PATCH v5 13/13] selftests/liveupdate: Add stress-files " Pasha Tatashin

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