Re: [RFC PATCH v2 1/2] kho: Introduce a helper to init unsplit pages

Mike Rapoport <[email protected]> Mon, 20 Jul 2026 19:57:15 +0300
Newsgroups org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <178456663513.143128.13731300065093148388.b4-review@b4>
> The current KHO restoration logic assumes all multi-page blocks are
> split into independent 4KB pages. Break out a helper to prepare for
> supporting high-order non-compound pages.
> 
> Extract kho_init_unsplit_pages() to handle the refcount pattern
> where only the head page is refcounted. Use the helper for folio
> restoration that requires a similar refcount logic.
> 
> Signed-off-by: Pranjal Shrivastava <[email protected]>
>
> diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
> index 4834a809985ab..07f6f453cd69d 100644
> --- a/kernel/liveupdate/kexec_handover.c
> +++ b/kernel/liveupdate/kexec_handover.c
> @@ -357,6 +357,24 @@ int kho_radix_walk_tree(struct kho_radix_tree *tree,
>  }
>  EXPORT_SYMBOL_GPL(kho_radix_walk_tree);
>  
> +/* For physically contiguous pages. */
> +static void kho_init_unsplit_pages(struct page *page, unsigned int order)
> +{

Can't say I like "unsplit". How about kho_init_high_order_page?

And whatever name we pick here, it's surely must end with "page" rather
than "pages".

-- 
Sincerely yours,
Mike.