From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Balbir Singh <balbirs@nvidia.com>, Zi Yan <ziy@nvidia.com>,
David Hildenbrand <david@redhat.com>,
linux-mm@kvack.org, Hugh Dickins <hughd@google.com>,
Kirill Shutemov <k.shutemov@gmail.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>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] __folio_split() clean up.
Date: Thu, 17 Jul 2025 13:40:55 +0100 [thread overview]
Message-ID: <1cb14f22-bb17-4997-bfb3-6f1d1f984d3c@lucifer.local> (raw)
In-Reply-To: <20250714171823.3626213-1-ziy@nvidia.com>
Hm something has gone weird in mm-new with this.
The patches are in the correct order, but the 2/2 patch, 'mm/huge_memory: use
folio_expected_ref_count() to calculate ref_count.' contains the cover letter
and has the suffix:
This patch (of 2):
Instead of open coding the ref_count calculation, use
folio_expected_ref_count()
But immediately prior to it is 1/2 - mm/huge_memory: move unrelated code
out of __split_unmapped_folio() but with no cover letter reference.
Andrew - has quilt got confused here? :)
Thanks, Lorenzo
On Mon, Jul 14, 2025 at 01:18:21PM -0400, Zi Yan wrote:
> Based on the prior discussion[1], this patch improves
> __split_unmapped_folio() by making it reusable for splitting unmapped
> folios. This helps avoid the need for a new boolean unmapped parameter
> to guard mapping-related code.
>
> An additional benefit is that __split_unmapped_folio() could be
> called on after-split folios by __folio_split(). It can enable new split
> methods. For example, at deferred split time, unmapped subpages can
> scatter arbitrarily within a large folio, neither uniform nor non-uniform
> split can maximize after-split folio orders for mapped subpages.
> The hope is that by calling __split_unmapped_folio() multiple times,
> a better split result can be achieved.
>
> It passed mm selftests.
>
>
> Changelog
> ===
> From V2[3]:
> 1. Code format fixes
> 2. Restructured code to remove after_split goto label.
>
> From V1[2]:
> 1. Fixed indentations.
> 2. Used folio_expected_ref_count() to calculate ref_count instead of
> open coding.
>
>
> [1] https://lore.kernel.org/linux-mm/94D8C1A4-780C-4BEC-A336-7D3613B54845@nvidia.com/
> [2] https://lore.kernel.org/linux-mm/20250711030259.3574392-1-ziy@nvidia.com/
> [2] https://lore.kernel.org/linux-mm/20250711182355.3592618-1-ziy@nvidia.com/
>
> Zi Yan (2):
> mm/huge_memory: move unrelated code out of __split_unmapped_folio()
> mm/huge_memory: use folio_expected_ref_count() to calculate ref_count.
>
> mm/huge_memory.c | 289 +++++++++++++++++++++++------------------------
> 1 file changed, 142 insertions(+), 147 deletions(-)
>
> --
> 2.47.2
>
next prev parent reply other threads:[~2025-07-17 12:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 17:18 Zi Yan
2025-07-14 17:18 ` [PATCH v3 1/2] mm/huge_memory: move unrelated code out of __split_unmapped_folio() Zi Yan
2025-07-14 18:54 ` David Hildenbrand
2025-07-17 14:07 ` Lorenzo Stoakes
2025-07-17 15:41 ` Zi Yan
2025-07-17 17:44 ` Lorenzo Stoakes
2025-07-17 18:05 ` Zi Yan
2025-07-17 18:07 ` Lorenzo Stoakes
2025-07-14 17:18 ` [PATCH v3 2/2] mm/huge_memory: use folio_expected_ref_count() to calculate ref_count Zi Yan
2025-07-17 8:03 ` Baolin Wang
2025-07-17 14:31 ` Lorenzo Stoakes
2025-07-17 12:40 ` Lorenzo Stoakes [this message]
2025-07-17 15:54 ` [PATCH v3 0/2] __folio_split() clean up Zi Yan
2025-07-17 17:39 ` Lorenzo Stoakes
2025-07-17 22:35 ` Andrew Morton
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=1cb14f22-bb17-4997-bfb3-6f1d1f984d3c@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=balbirs@nvidia.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=hughd@google.com \
--cc=k.shutemov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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