Re: [PATCH v2 24/24] ext4: enable block size larger than page size
From: Baokun Li
Date: Mon Nov 10 2025 - 22:31:41 EST
On 2025-11-10 20:51, Pankaj Raghav wrote:
> On 11/7/25 15:42, libaokun@xxxxxxxxxxxxxxx wrote:
>> From: Baokun Li <libaokun1@xxxxxxxxxx>
>>
>> Since block device (See commit 3c20917120ce ("block/bdev: enable large
>> folio support for large logical block sizes")) and page cache (See commit
>> ab95d23bab220ef8 ("filemap: allocate mapping_min_order folios in the page
>> cache")) has the ability to have a minimum order when allocating folio,
>> and ext4 has supported large folio in commit 7ac67301e82f ("ext4: enable
>> large folio for regular file"), now add support for block_size > PAGE_SIZE
>> in ext4.
>>
>> set_blocksize() -> bdev_validate_blocksize() already validates the block
>> size, so ext4_load_super() does not need to perform additional checks.
>>
>> Here we only need to add the FS_LBS bit to fs_flags.
>>
>> In addition, allocation failures for large folios may trigger warn_alloc()
>> warnings. Therefore, as with XFS, mark this feature as experimental.
>>
> Are you adding the experimental flag because allocation failures can occur with
> LBS configuration or because it is a new feature (or both)?
>
> In XFS we added this flag because this was a new feature and not because of the
> allocation failure that might happen.
Yeah, both. Large folios still have some problems (allocation failures,
fragmentation, memory overhead, etc.) to sort out, and LBS has to be
forced on.
> Is it even possible to get rid of these allocation failures in systems were the
> memory is limited as the page cache works in > PAGE_SIZE allocations?
>
> --
> Pankaj
The MM people are working in this direction, and how to avoid memory
allocation failures has also been a frequent topic of discussion recently.
I believe this issue will be resolved in the near future.
Regards,
Baokun