On Wed, Apr 29, 2026 at 11:35:32AM -0400, Zi Yan wrote:
>After READ_ONLY_THP_FOR_FS is removed, FS either supports large folio or
>not. folio_split() can be used on a FS with large folio support without
>worrying about getting a THP on a FS without large folio support.
>
>When READ_ONLY_THP_FOR_FS was present, a PMD large pagecache folio can
>appear in a FS without large folio support after khugepaged or
>madvise(MADV_COLLAPSE) creates it. During truncate_inode_partial_folio(),
>such a PMD large pagecache folio is split and if the FS does not support
>large folio, it needs to be split to order-0 ones and could not be split
>non uniformly to ones with various orders. try_folio_split_to_order() was
>added to handle this situation by checking folio_check_splittable(...,
>SPLIT_TYPE_NON_UNIFORM) to detect if the large folio is created due to
>READ_ONLY_THP_FOR_FS and the FS does not support large folio. Now
>READ_ONLY_THP_FOR_FS is removed, all large pagecache folios are created
>with FSes supporting large folio, this function is no longer needed and all
>large pagecache folios can be split non uniformly.
>
>Signed-off-by: Zi Yan <[email protected]>
>---

With that gone, large page-cache folios should only exsit on mappings
that support large folios, so folio_split() with
mapping_min_folio_order() is enough :)

LGTM, feel free to add:
Reviewed-by: Lance Yang <[email protected]>

Reply via email to