Re: [PATCH 2/2] kho: drop restriction on maximum page order

From: Pratyush Yadav

Date: Tue Mar 17 2026 - 05:17:07 EST


On Tue, Mar 10 2026, Mike Rapoport wrote:

> On Mon, Mar 09, 2026 at 12:34:07PM +0000, Pratyush Yadav wrote:
>> KHO currently restricts the maximum order of a restored page to the
>> maximum order supported by the buddy allocator. While this works fine
>> for much of the data passed across kexec, it is possible to have pages
>> larger than MAX_PAGE_ORDER.
>>
>> For one, it is possible to get a larger order when using
>> kho_preserve_pages() if the number of pages is large enough, since it
>> tries to combine multiple aligned 0-order preservations into one higher
>> order preservation.
>>
>> For another, upcoming support for hugepages can have gigantic hugepages
>> being preserved over KHO.
>>
>> There is no real reason for this limit. The KHO preservation machinery
>> can handle any page order. Remove this artificial restriction on max
>> page order.
>>
>> Signed-off-by: Pratyush Yadav <pratyush@xxxxxxxxxx>
>> Signed-off-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>
>
> One SOB should be enough ;-)

Hmm, I figured the unemployed me (who originally wrote the patch) and
the employed-by-google me (who is doing this new version) would count as
two separate entities and there should be a S-o-b for both.

Anyway, I am fine with dropping either one of the two.

>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

Thanks!

[...]

--
Regards,
Pratyush Yadav