From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Francois Dugast <francois.dugast@intel.com>,
intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
Matthew Brost <matthew.brost@intel.com>,
Balbir Singh <balbirs@nvidia.com>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Zi Yan <ziy@nvidia.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Nico Pache <npache@redhat.com>,
Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Alistair Popple <apopple@nvidia.com>
Subject: Re: [PATCH v3 1/7] mm: Add folio_split_unref helper
Date: Fri, 9 Jan 2026 14:26:05 +0100 [thread overview]
Message-ID: <1319a24a-bcfc-47e5-a022-f5d00994acc9@kernel.org> (raw)
In-Reply-To: <59fb1669-2908-4cab-b3c0-b97479da3fb9@kernel.org>
On 1/9/26 14:19, David Hildenbrand (Red Hat) wrote:
> On 1/9/26 09:54, Francois Dugast wrote:
>> From: Matthew Brost <matthew.brost@intel.com>
>>
>> Add folio_split_unref helper which splits an unreferenced folio
>
> split_unref reads like "split and unref".
>
> You probably want to call this something like "folio_split_frozen" ?
>
> The very definition of "frozen" is "refcount = 0 ", so you can simplify
> the documentation.
>
> Are the folios you want to pass in there completely unused (-> free) or
> might they still be in use (e.g., migration entries point at them during
> folio split)
>
> So I am not sure yet if this should be "folio_split_frozen()" or
> "folio_split_freed()" or sth like that.
>
> I'm not CCed on the other patches in the series or the cover letter, so
> I don't see the context.
>
Ah, I was CCed on #3 where we call this function on folios that are
getting freed.
In that case it would be acceptable to initialize folio->mapping (and
folio->index?) of the split folios. Do we also have to initialize
folio->flags, folio->private etc?
See __split_huge_page_tail().
folio_split_freed() would likely be best, because then it is clearer
that there is absolutely no state to copy from the large folio.
> You should describe in this patch here in which context the function is
> supposed to be used in later commits.
--
Cheers
David
next prev parent reply other threads:[~2026-01-09 13:26 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260109085605.443316-1-francois.dugast@intel.com>
2026-01-09 8:54 ` Francois Dugast
2026-01-09 13:19 ` David Hildenbrand (Red Hat)
2026-01-09 13:26 ` David Hildenbrand (Red Hat) [this message]
2026-01-09 14:30 ` Zi Yan
2026-01-09 15:11 ` David Hildenbrand (Red Hat)
2026-01-09 18:38 ` Matthew Brost
2026-01-09 18:37 ` Andrew Morton
2026-01-09 18:41 ` Zi Yan
2026-01-09 18:54 ` Francois Dugast
2026-01-09 18:43 ` Matthew Brost
2026-01-09 19:22 ` Andrew Morton
2026-01-09 19:26 ` Liam R. Howlett
2026-01-09 8:54 ` [PATCH v3 3/7] mm: Split device-private and coherent folios before freeing Francois Dugast
2026-01-09 11:09 ` Mika Penttilä
2026-01-09 17:28 ` Zi Yan
2026-01-09 18:26 ` Matthew Brost
2026-01-09 18:53 ` Zi Yan
2026-01-09 19:08 ` Matthew Brost
2026-01-09 19:23 ` Zi Yan
2026-01-09 20:03 ` Matthew Brost
2026-01-09 20:15 ` Zi Yan
2026-01-09 21:34 ` Balbir Singh
2026-01-09 21:43 ` Zi Yan
2026-01-09 22:11 ` Balbir Singh
2026-01-09 22:14 ` Zi Yan
2026-01-09 22:36 ` Balbir Singh
2026-01-09 23:15 ` Matthew Brost
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=1319a24a-bcfc-47e5-a022-f5d00994acc9@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dev.jain@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=francois.dugast@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=matthew.brost@intel.com \
--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