[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1562980-b9df-4aa6-a44f-185a7c586b33@redhat.com>
Date: Fri, 31 Oct 2025 08:58:14 +0100
From: David Hildenbrand <david@...hat.com>
To: Zi Yan <ziy@...dia.com>, linmiaohe@...wei.com, jane.chu@...cle.com
Cc: kernel@...kajraghav.com, akpm@...ux-foundation.org, mcgrof@...nel.org,
nao.horiguchi@...il.com, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, Nico Pache <npache@...hat.com>,
Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
Barry Song <baohua@...nel.org>, Lance Yang <lance.yang@...ux.dev>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Wei Yang <richard.weiyang@...il.com>, Yang Shi <shy828301@...il.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH v4 1/3] mm/huge_memory: add split_huge_page_to_order()
On 30.10.25 02:40, Zi Yan wrote:
> When caller does not supply a list to split_huge_page_to_list_to_order(),
> use split_huge_page_to_order() instead.
>
> Signed-off-by: Zi Yan <ziy@...dia.com>
> Acked-by: David Hildenbrand <david@...hat.com>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> ---
> include/linux/huge_mm.h | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 7698b3542c4f..34f8d8453bf3 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -381,6 +381,10 @@ static inline int split_huge_page_to_list_to_order(struct page *page, struct lis
> {
> return __split_huge_page_to_list_to_order(page, list, new_order, false);
> }
> +static inline int split_huge_page_to_order(struct page *page, unsigned int new_order)
> +{
> + return split_huge_page_to_list_to_order(page, NULL, new_order);
> +}
>
Scanning this once again, I guess in the future all these interfaces
should rather be folio-based, and if we want to split at a specific page
where we want the reference to be held later, pass in a page:
int folio_split_to_order(struct folio *folio, struct page *page,
unsigned int new_order);
With the hope that we could end up with all folio split functions to
look similar in that regard ... and remove all the "huge_page" terminology.
Of course, that can be done as cleanups on top, because there seems to
be quite some inconsistency already.
--
Cheers
David / dhildenb
Powered by blists - more mailing lists