Re: [RFC v2 0/3] Decoupling large folios dependency on THP

From: Pankaj Raghav

Date: Tue Mar 03 2026 - 09:23:23 EST




On 2/27/2026 6:31 AM, Matthew Wilcox wrote:
On Sat, Dec 06, 2025 at 04:08:55AM +0100, Pankaj Raghav wrote:
There are multiple solutions to solve this problem and this is one of
them with minimal changes. I plan on discussing possible other solutions
at the talk.

Here's an argument. The one remaining caller of add_to_page_cache_lru()
is ramfs_nommu_expand_for_mapping(). Attached is a patch which
eliminates it ... but it doesn't compile because folio_split() is
undefined on nommu.

So either we need to reimplement all the good stuff that folio_split()
does for us, or we need to make folio_split() available on nommu.


I had a question, one conclusion I came to was: folio splitting depends on THP, so we either need to implement the split logic without THP dependency or just make sure we don't split a large folio at all when we use large folio (what I did in this RFC but not a great long term solution).

So even if we implement folio_split without any dependency on THP, do we need to re-implement or make folio_split available for nommu? I am also wondering how nommu code is related to removing large folios dependency on THP.

--
Pankaj