Re: [PATCH v2 00/24] ext4: enable block size larger than page size
From: Pankaj Raghav
Date: Mon Nov 10 2025 - 10:39:47 EST
On 11/10/25 05:32, Theodore Ts'o wrote:
> I've started looking at this patch series and playing with it, and one
> thing which is worth noting is that CONFIG_TRANSPARENT_HUGEPAGE needs
> to be enabled, or else sb_set_blocksize() will fail for block size >
> page size. This isn't specific to ext4, and maybe I'm missing
> something, but apparently this isn't documented. I had to go digging
> through the source code to figure out what was needed.
>
> I wonder if we should have some kind of warning in sb_set_blocksize()
> where if there is an attempt to set a blocksize > page size and
> transparent hugepages is not configured, we issue a printk_once()
> giving a hint to the user that the reason that the mount failed was
> because transparent hugepages wasn't enabled at compile time.
>
I added something similar for block devices[1]. Probably we might need something
here as well as a stop gap.
> It **really** isn't obvious that large block size support and
> transparent hugepages are linked.
Funny that you mention this because I have talk about this topic:
Decoupling Large Folios from Transparent Huge Pages in LPC under MM MC [2].
You are more than welcome to come to the talk :)
But just a small summary: When large folios were introduced, it used
THP infrastructure for splitting the folios (for example when we do a truncate).
I hope we will soon be able to sort it out so that we don't have
to sprinkle CONFIG_THP everywhere.
--
Pankaj
[1] https://lore.kernel.org/all/20250704092134.289491-1-p.raghav@xxxxxxxxxxx/
[2] https://lpc.events/event/19/contributions/2139/>
> - Ted
>