Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting
From: Linus Torvalds
Date: Wed Dec 09 2020 - 16:05:25 EST
On Wed, Dec 9, 2020 at 12:32 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> If a filesystem has put an Uptodate page into the page cache, the
> rest of the kernel can read it without telling the filesystem.
XFS does the same thing for xfs_file_read_iter() too.
Not that I disagree with you - when you mmap a file, once it's mapped
you see the data without any lock anyway. So it's all kinds of
pointless to serialize the page fault, because that's simply not
relevant. The lock will be gone by the time the user actually sees the
data.
But hey, the XFS people have their opinions.
Linus