Re: [PATCH v2 0/2] mm, kho: count KHO bootmem in CmaTotal and in zoneinfo's cma

From: Mike Rapoport

Date: Mon Nov 30 2026 - 02:49:24 EST


From: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

On Sun, 29 Nov 2026 20:19:22 -0800, Chris Down wrote:
> KHO bootmem is handed to the buddy allocator in MIGRATE_CMA pageblocks,
> so its free pages show up in CmaFree, but two of the CMA counters leave
> it out. CmaTotal in /proc/meminfo never includes it, and the cma line in
> /proc/zoneinfo includes it after a cold boot but goes to 0 after a KHO
> kexec.
>
> Patch 1 counts bootmem in zone->cma_pages after a KHO kexec, as
> kho_init() already does on a cold boot. Patch 2 then adds bootmem to
> totalcma_pages after both kinds of boot.
>
> [...]

Applied to liveupdate-7.5 branch of liveupdate/linux.git tree, thanks!

[1/2] kho: count bootmem in zoneinfo's cma after a KHO kexec
commit: 87e70b5804ca0a315fd9f1539eff7f3d09a02674
[2/2] kho: count bootmem in CmaTotal
commit: 0ec4b690e8cd27e58764892d8889f0046fdb3bd1

tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
branch: liveupdate-7.5

--
Sincerely yours,
Mike.