From: Hannes Reinecke <hare@suse.de>
To: Pankaj Raghav <kernel@pankajraghav.com>,
Pankaj Raghav <p.raghav@samsung.com>,
Suren Baghdasaryan <surenb@google.com>,
Mike Rapoport <rppt@kernel.org>,
David Hildenbrand <david@redhat.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Michal Hocko <mhocko@suse.com>, Lance Yang <lance.yang@linux.dev>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Dev Jain <dev.jain@arm.com>, Barry Song <baohua@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Nico Pache <npache@redhat.com>, Zi Yan <ziy@nvidia.com>,
Vlastimil Babka <vbabka@suse.cz>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
mcgrof@kernel.org, gost.dev@samsung.com, tytso@mit.edu
Subject: Re: [RFC v2 1/3] filemap: set max order to be min order if THP is disabled
Date: Wed, 10 Dec 2025 01:38:09 +0100 [thread overview]
Message-ID: <b23da846-ff6e-4b73-9691-beb14ceb0fa5@suse.de> (raw)
In-Reply-To: <3ced3736-81e8-4bc3-b5a3-50ac4af3536c@pankajraghav.com>
On 12/9/25 17:33, Pankaj Raghav wrote:
> On 12/9/25 13:15, Hannes Reinecke wrote:
>> On 12/6/25 04:08, Pankaj Raghav wrote:
>>> Large folios in the page cache depend on the splitting infrastructure from
>>> THP. To remove the dependency between large folios and
>>> CONFIG_TRANSPARENT_HUGEPAGE, set the min order == max order if THP is
>>> disabled. This will make sure the splitting code will not be required
>>> when THP is disabled, therefore, removing the dependency between large
>>> folios and THP.
>>>
>> The description is actually misleading.
>> It's not that you remove the dependency from THP for large folios
>> _in general_ (the CONFIG_THP is retained in this patch).
>> Rather you remove the dependency for large folios _for the block layer_.
>> And that should be make explicit in the description, otherwise the
>> description and the patch doesn't match.
>>
>
> Hmm, that is not what I am doing. This has nothing to do with the block layer directly.
> I mentioned this in the cover letter but I can reiterate it again.
>
> Large folios depended on THP infrastructure when it was introduced. When we added added LBS support
> to the block layer, we introduced an indirect dependency on CONFIG_THP. When we disabled config_THP
> and had a block device logical block size > page size, we ran into a panic.
>
> That was fixed here[1].
>
Yes, and no. That patch limited the maximum blocksize without THP to 4k,
so effectively disabling LBS.
> If this patch is upstreamed, then we can disable THP but still have a LBS drive attached without any
> issues.
>
But this is what I meant. We do _not_ disable the dependency on THP for
LBS, we just remove checks for the config option itself in the block
layer code. The actual dependency on THP will remain as LBS will only
be supported if THP is enabled.
> Baolin added another CONFIG_THP block in ext4 [2]. With this support, we don't need to sprinkle THP
> where file backed large folios are used.
>
> Happy to discuss this in LPC (if you are attending)!
>
The very first presentation on the first day in the CXL track. Yes :-)
Let's discuss there; would love to figure out if we cannot remove the
actual dependency on THP, too.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2025-12-10 0:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-06 3:08 [RFC v2 0/3] Decoupling large folios dependency on THP Pankaj Raghav
2025-12-06 3:08 ` [RFC v2 1/3] filemap: set max order to be min order if THP is disabled Pankaj Raghav
2025-12-09 7:45 ` Hannes Reinecke
2025-12-09 16:33 ` Pankaj Raghav
2025-12-10 0:38 ` Hannes Reinecke [this message]
2025-12-06 3:08 ` [RFC v2 2/3] huge_memory: skip warning if min order and folio order are same in split Pankaj Raghav
2025-12-06 3:08 ` [RFC v2 3/3] blkdev: remove CONFIG_TRANSPARENT_HUGEPAGES dependency for LBS devices Pankaj Raghav
2025-12-09 16:03 ` [RFC v2 0/3] Decoupling large folios dependency on THP Zi Yan
2025-12-10 4:27 ` Matthew Wilcox
2025-12-10 16:37 ` Zi Yan
2025-12-11 7:37 ` Matthew Wilcox
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=b23da846-ff6e-4b73-9691-beb14ceb0fa5@suse.de \
--to=hare@suse.de \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=gost.dev@samsung.com \
--cc=kernel@pankajraghav.com \
--cc=lance.yang@linux.dev \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mcgrof@kernel.org \
--cc=mhocko@suse.com \
--cc=npache@redhat.com \
--cc=p.raghav@samsung.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=tytso@mit.edu \
--cc=vbabka@suse.cz \
--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