Re: [PATCH v3 16/18] mm/huge_memory: clarify supported split orders in comment

From: Zi Yan

Date: Tue Aug 25 2026 - 22:02:45 EST


On Thu Aug 20, 2026 at 2:55 PM EDT, Kairui Song via B4 Relay wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> The doc comment for __split_huge_page_to_list_to_order() needs an
> update: only order 1 is rejected for anon and swapcache folios,
> matching the new_order == 1 check in folio_check_splittable().
>
> Also realign the continuation line of the function signature while at
> it.
>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
> ---
> mm/huge_memory.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 06f353f937d1..0a971ca48151 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -4400,11 +4400,10 @@ int folio_split_unmapped(struct folio *folio, unsigned int new_order)
> * GUP pins, will result in the folio not getting split; instead, the caller
> * will receive an -EAGAIN.
> *
> - * 4) @new_order > 1, usually. Order-1 is not supported for anon or swapcache
> - * folios: anon folios need subpage 2 for _deferred_list, which order-1
> - * folios lack, and a swapcache folio may become anon once faulted in.
> - * File-backed order-1 folios are supported, since they do not use
> - * _deferred_list.
> + * 4) @new_order != 1 for anon or swapcache. Anon folios need subpage 2 for

We use head page + tail pages instead of subpages, so the sentence could
be

Anon folios stores _deferred_list in second tail page, which order-1
folios lack, ...

> + * _deferred_list, which order-1 folios lack, and a swapcache folio may
> + * become anon once faulted in. File-backed order-1 folios are supported,
> + * since they do not use _deferred_list.
> *
> * After splitting, the caller's folio reference will be transferred to @page,
> * resulting in a raised refcount of @page after this call. The other pages may
> @@ -4432,7 +4431,7 @@ int folio_split_unmapped(struct folio *folio, unsigned int new_order)
> * with the folio. Splitting to order 0 is compatible with all folios.
> */
> int __split_huge_page_to_list_to_order(struct page *page, struct list_head *list,
> - unsigned int new_order)
> + unsigned int new_order)
> {
> struct folio *folio = page_folio(page);
>

Otherwise, LGTM.

Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>



--
Best Regards,
Yan, Zi