Skip to content

kho, liveupdate: KHO/LUO observability

Chris Down kexec linux-doc linux-kselftest linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9kho: Reclaim the metadata page left reserved after kexecDocumentation/admin-guide/mm/kho.rst kernel/liveupdate/kexec_handover.c+10 -44 replies
2/9kho: Make bootmem reservations visible to fleet monitoringDocumentation/ABI/testing/sysfs-kernel-kexec-kdump Documentation/admin-guide/mm/kho.rst include/linux/kexec_handover.h +2 more+46 -03 replies
3/9liveupdate: Make failed retrieves distinguishable from dropped filesDocumentation/ABI/testing/sysfs-class-misc-liveupdate Documentation/userspace-api/liveupdate.rst MAINTAINERS +4 more+156 -20 replies
4/9selftests/liveupdate: Catch incorrect file accounting across kexectools/testing/selftests/liveupdate/Makefile tools/testing/selftests/liveupdate/init.c tools/testing/selftests/liveupdate/luo_handover_stats.c +2 more+207 -00 replies
5/9selftests/kho: Catch missing or zero bootmem reports before kexectools/testing/selftests/kho/init.c tools/testing/selftests/kho/vmtest.sh+25 -00 replies
6/9kho: Expose rejected handovers that look like cold bootsDocumentation/ABI/testing/sysfs-class-misc-liveupdate Documentation/ABI/testing/sysfs-kernel-kexec-kdump Documentation/admin-guide/mm/kho.rst +3 more+66 -10 replies
7/9kho: Report how much handover memory is preserved and restoredDocumentation/ABI/testing/sysfs-kernel-kexec-kdump Documentation/admin-guide/mm/kho.rst kernel/liveupdate/kexec_handover.c+36 -00 replies
8/9liveupdate: Expose the sequence number for consecutive live updatesDocumentation/ABI/testing/sysfs-class-misc-liveupdate Documentation/userspace-api/liveupdate.rst kernel/liveupdate/luo_core.c+18 -00 replies
9/9selftests/liveupdate: Check handover revival, sequence and memory statstools/testing/selftests/liveupdate/luo_handover_stats.c+67 -70 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchBreno LeitaoPasha Tatashin
1/9T-b R-b
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] kho, liveupdate: KHO/LUO observability

At Meta, we are moving towards using live update on hypervisors whose VMs can't be migrated away first. We also want to preserve service fd stores across systemctl kexec.

Our kernel rollout is driven by health checks from each host. For example, an increase in rejected handovers or retrieval failures may be a reason to stop a rollout, and the bootmem size and sequence number help us understand what is happening on which hosts. The series exposes:

- how much memory KHO set aside
- whether the new kernel accepted the incoming handover
- whether LUO could give back the state that userspace handed over

We expose these in sysfs so the collector can read them without opening /dev/liveupdate, which starts deserialisation, or depending on debugfs or the kernel log.

I also noticed that the incoming kexec metadata page stays reserved after boot, so free it once its contents have been copied.

Chris Down (9):
kho: Reclaim the metadata page left reserved after kexec
kho: Make bootmem reservations visible to fleet monitoring
liveupdate: Make failed retrieves distinguishable from dropped files selftests/liveupdate: Catch incorrect file accounting across kexec selftests/kho: Catch missing or zero bootmem reports before kexec
kho: Expose rejected handovers that look like cold boots
kho: Report how much handover memory is preserved and restored
liveupdate: Expose the sequence number for consecutive live updates selftests/liveupdate: Check handover revival, sequence and memory
stats

 .../ABI/testing/sysfs-class-misc-liveupdate   |  56 ++++
 .../ABI/testing/sysfs-kernel-kexec-kdump      |  30 ++
 Documentation/admin-guide/mm/kho.rst          |  19 +-
 Documentation/userspace-api/liveupdate.rst    |   8 +
 MAINTAINERS                                   |   1 +
 include/linux/kexec_handover.h                |   3 +
 kernel/kexec_core.c                           |  26 +-
 kernel/liveupdate/kexec_handover.c            |  82 +++++-
 kernel/liveupdate/luo_core.c                  |  58 ++++
 kernel/liveupdate/luo_file.c                  |  16 +-
 kernel/liveupdate/luo_internal.h              |  34 +++
 kernel/liveupdate/luo_session.c               |   6 +
 tools/testing/selftests/kho/init.c            |  24 ++
 tools/testing/selftests/kho/vmtest.sh         |   1 +
 tools/testing/selftests/liveupdate/Makefile   |   1 +
 tools/testing/selftests/liveupdate/init.c     |   5 +
 .../selftests/liveupdate/luo_handover_stats.c | 258 ++++++++++++++++++
 .../selftests/liveupdate/run-vmtests.sh       |   1 +
 tools/testing/selftests/liveupdate/vmtest.sh  |   2 +
 19 files changed, 624 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-misc-liveupdate
 create mode 100644 tools/testing/selftests/liveupdate/luo_handover_stats.c

base-commit: a0dc8eddbfdb6dd9c5c2b70eb66ab49cb1978425

Signature · 1 line
2.54.0