Re: KHO bootmem without pre-reservation (was: Re: [Hypervisor Live Update] Notes from November 16, 2026)

From: tarunsahu

Date: Thu Dec 03 2026 - 13:05:01 EST


Chris Down <chris@xxxxxxxxxxxxxx> writes:

> Hi Samiullah, Pratyush, Tarun,
>
> At Meta, the size of the bootmem reservation is currently the main thing
> stopping us from enabling KHO more widely, so I'd like to spend some time
> on reducing it. Before I start, I want to make sure that I don't duplicate
> or get in the way of what's already planned or in motion.
>
> Here is my understanding of the situation as it is right now. Please let me
> know if I have anything muddled!
>
> - On 21 Sep [0] there was discussion about dropping the pre-reserved
> areas and relying on dynamically extended bootmem instead, perhaps with
> a small bootstrap region. Samiullah wrote up the initial ideas.
> - On 19 Oct [1] there was discussion about the report about CMA pinning,
> and Tarun's work with David on migrating movable pages into CMA.

I am not sure if CMA migration work will solve the problems with KHO
having large CMA size, but certainly it will improve how kernel manage
memory. I have posted a discussion thread here [1]. I would be keen to
know what problems specificaly you are seeing that stops the KHO from
enabling.

[1]: https://lore.kernel.org/all/9huzfqwent4i.fsf@xxxxxxxxxxxxxxxxxxxxxx/


> - Mike's sizing fixes are now in the liveupdate tree, and the notes in
> this thread say that the bootmem layout is still expected to change.
>
> I have a few questions:
>
> 1. Samiullah, is the design doc public, or could you share it? I couldn't
> find a link to it on the list. I also saw there's a mention of a Google
> Doc attached to the calendar invite, but I didn't find a link to that,
> only to the Meet link itself.
>
> 2. Is anyone working on an implementation at the moment? If not, I'm
> happy to take this on.
>
> 3. Is the main open problem still how to guarantee that the next kernel
> can boot when the preserved memory is badly fragmented, or has the
> thinking moved on since LPC?
>
> 4. Would smaller reductions to the current scheme be welcome in the
> meantime? I haven't measured anything yet, so please tell me if I'm
> missing something. :-)
>
> Either way, I can measure on top of Mike's fixes and test with our
> workloads, and I'm glad to pick up whichever pieces are useful.
>
> I'd also like to propose that as a topic for the next call if that sounds
> good? Is that scheduled yet, by the way?
>
> Thanks,
>
> Chris
>
> [0]: https://lore.kernel.org/r/20260925143000.2729890-1-pasha.tatashin@xxxxxxxxxx
> [1]: https://lore.kernel.org/r/20261025143601.2564170-1-pasha.tatashin@xxxxxxxxxx