From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Zi Yan <ziy@nvidia.com>
Cc: Jiaqi Yan <jiaqiyan@google.com>,
akpm@linux-foundation.org, baolin.wang@linux.alibaba.com,
Liam.Howlett@oracle.com, npache@redhat.com, ryan.roberts@arm.com,
dev.jain@arm.com, baohua@kernel.org, lance.yang@linux.dev,
linux-mm@kvack.org, inux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] mm/huge_memory: rename __split_unmapped_folio to __split_frozen_folio
Date: Wed, 19 Nov 2025 18:03:30 +0100 [thread overview]
Message-ID: <e023ab20-2452-4b4d-9ac9-1877e220dd77@kernel.org> (raw)
In-Reply-To: <6F8BA2D3-E087-4A02-9ECE-F2EEF470CFE0@nvidia.com>
On 19.11.25 17:52, Zi Yan wrote:
> On 19 Nov 2025, at 11:41, David Hildenbrand (Red Hat) wrote:
>
>> On 19.11.25 06:46, Jiaqi Yan wrote:
>>> The correct prerequisite for this split utility isn't really about
>>> if the folio is unmapped; it is more about after unmapped, folio's
>>> refcount is zero and has also been frozen. So rename it to
>>> __split_frozen_folio.
>>>
>>> Add a warning in case the folio has non-zero refcount.
>>>
>>> No new function is added.
>>>
>>
>> While we're at it, can we look into calling this something with the prefix folio_split / __folio_split to get some consistent naming at one point?
>
> Does the prefix have to be __folio_split?
> __folio_split_frozen() or __frozen_folio_split()?
Personally, I think it's all easier to understand if any folio splitting
function starts with a common prefix.
At least when it comes to any functions exposed outside of hugetlb.c
For internal functions I don't care as much.
>
> In terms of naming for split a folio, I used folio_split() for non uniform split,
> since split_{page,folio}* are for uniform split. Are you intended to use
> folio_split prefix for both? We probably can have a separate patch to
> change these function names all at once?
We should change all them at some point yes.
Regarding uniform vs. !uniform we could either pass the enum later or
also have it encoded in the name.
Probably will be a longer discussion :)
--
Cheers
David
prev parent reply other threads:[~2025-11-19 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 5:46 Jiaqi Yan
2025-11-19 16:35 ` Zi Yan
2025-11-19 16:41 ` David Hildenbrand (Red Hat)
2025-11-19 16:52 ` Zi Yan
2025-11-19 17:03 ` David Hildenbrand (Red Hat) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e023ab20-2452-4b4d-9ac9-1877e220dd77@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dev.jain@arm.com \
--cc=inux-kernel@vger.kernel.org \
--cc=jiaqiyan@google.com \
--cc=lance.yang@linux.dev \
--cc=linux-mm@kvack.org \
--cc=npache@redhat.com \
--cc=ryan.roberts@arm.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox