[PATCH 7/9] kho: Report how much handover memory is preserved and restored
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Wed Nov 11 23:54:12 PST 2026
> Most memory the previous kernel preserved stays reserved until its user
> restores it through KHO, either to use it again or to free it. If
> nothing does, it stays reserved for as long as the kernel runs. On a
> hypervisor host that can be gigabytes, but amusingly nothing really
> shows it reliably. The host simply has less memory than it should, which
> is not exactly obvious.
>
> All preserved memory is reserved in kho_preserved_memory_reserve(), and
> everything restored through KHO goes through kho_restore_page(), so KHO
> can count both easily. Let's add preserved_size and restored_size, in
> bytes, to /sys/kernel/kexec/kho_incoming/.
>
> For example, after a live update preserving a 64 MiB memfd:
>
> preserved_size restored_size
> before retrieval 67403776 8192
> after retrieval 67403776 67395584
>
> The 8 KiB left are the incoming KHO FDT and LUO's FLB header.
>
> Signed-off-by: Chris Down <chris at chrisdown.name>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1794383544.git.chris@chrisdown.name?part=7
More information about the kexec
mailing list