From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: willy@infradead.org, akpm@linux-foundation.org,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@suse.cz, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, ziy@nvidia.com, baolin.wang@linux.alibaba.com,
npache@redhat.com, ryan.roberts@arm.com, dev.jain@arm.com,
baohua@kernel.org, lance.yang@linux.dev,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/huge_memory: consolidate order-related checks into folio_split_supported()
Date: Fri, 14 Nov 2025 20:36:20 +0100 [thread overview]
Message-ID: <64b43302-e8cc-4259-9fa1-e27721c0d193@kernel.org> (raw)
In-Reply-To: <20251114150310.eua55tcgxl4mgdnp@master>
On 14.11.25 16:03, Wei Yang wrote:
> On Fri, Nov 14, 2025 at 09:49:34AM +0100, David Hildenbrand (Red Hat) wrote:
>> On 14.11.25 08:57, Wei Yang wrote:
>>> The primary goal of the folio_split_supported() function is to validate
>>> whether a folio is suitable for splitting and to bail out early if it is
>>> not.
>>>
>>> Currently, some order-related checks are scattered throughout the
>>> calling code rather than being centralized in folio_split_supported().
>>>
>>> This commit moves all remaining order-related validation logic into
>>> folio_split_supported(). This consolidation ensures that the function
>>> serves its intended purpose as a single point of failure and improves
>>> the clarity and maintainability of the surrounding code.
>>
>> Combining the EINVAL handling sounds reasonable.
>>
>
> You mean:
>
> This commit combines the EINVAL handling logic into folio_split_supported().
> This consolidation ... ?
It was not a suggestion to change, it was rather only a comment from my
side :)
[...]
>>
>> The mapping_max_folio_order() check is new now. What is the default value of that? Is it always initialized properly?
>>
>
> Not sure "is new now" means what?
>
> Original check use mapping_large_folio_support() which calls
> mapping_max_folio_order(). It looks not new to me.
Right, but we did not actually care about the exact value.
IOW, we didn't check for order <= mapping_max_folio_order() before.
SO I'm just curious if that is universally fine.
--
Cheers
David
next prev parent reply other threads:[~2025-11-14 19:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 7:57 Wei Yang
2025-11-14 8:49 ` David Hildenbrand (Red Hat)
2025-11-14 12:43 ` Zi Yan
2025-11-14 14:30 ` Wei Yang
2025-11-14 20:53 ` Zi Yan
2025-11-15 2:42 ` Wei Yang
2025-11-14 15:03 ` Wei Yang
2025-11-14 19:36 ` David Hildenbrand (Red Hat) [this message]
2025-11-15 2:51 ` Wei Yang
2025-11-15 5:07 ` Matthew Wilcox
2025-11-15 9:43 ` Wei Yang
2025-12-04 15:13 ` Wei Yang
2025-11-19 12:37 ` Dan Carpenter
2025-11-19 12:39 ` Wei Yang
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=64b43302-e8cc-4259-9fa1-e27721c0d193@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=lance.yang@linux.dev \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=npache@redhat.com \
--cc=richard.weiyang@gmail.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--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