Re: [LSF/MM/BPF TOPIC] Per-process page size
From: Matthew Wilcox
Date: Thu Feb 19 2026 - 23:49:46 EST
On Tue, Feb 17, 2026 at 04:30:59PM +0100, David Hildenbrand (Arm) wrote:
> In a private conversation I also raised that some situations might make it
> impossible/hard to drop+re-read.
>
> One example I cam up with if a folio is simply long-term R/O pinned. But I
> am also not quite sure how mlock might interfere here.
>
> So yes, I think the page cache is likely the one of the most
> problematic/messy thing to handle.
So what if we convert to max-supported-order the first time somebody
calls mmap on a given file? Most files are never mmaped, so it won't
affect them. And files that are mmaped are generally not written to.
So there should not be much in the page cache for the common case.
And if no pages from the file have been mmaped yet, they cannot be pinned
or mlocked.