Re: [Lsf-pc] [LSF/MM/BPF TOPIC] Per-process page size
From: Jan Kara
Date: Mon Feb 23 2026 - 08:04:50 EST
On Fri 20-02-26 17:50:44, David Hildenbrand (Arm) via Lsf-pc wrote:
> On 2/20/26 05:49, Matthew Wilcox wrote:
> > And if no pages from the file have been mmaped yet, they cannot be pinned
> > or mlocked.
>
> Is there some other way for someone to block a page from getting evicted
> from the pagecache?
>
> We have this memfd_pin_folios() thing, but I don't think we have something
> comparable for ordinary pagecache files.
>
> ... putting them into a pipe and never reading from the pipe maybe (I assume
> that's what splice() does, but not sure if it actually places the pages in
> there or whether it creates a copy first)?
Standard splice copies data first (it's using standard IO callbacks such as
->read_iter) so that doesn't pin page cache AFAICT. Only vmsplice(2) does
but that requires mmap.
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR