Re: [RFC PATCH 0/2] Use high-order folios in mmap sync RA

From: Matthew Wilcox

Date: Wed Apr 15 2026 - 09:19:34 EST


On Thu, Apr 16, 2026 at 03:28:51AM +0800, Anatoly Stepanov wrote:
> When "fault around" is enabled, 0-order folios might significantly
> slowdown filemap_map_pages().

There's a lot of "might" in this patchset. I'd like to know that there
is a real workload that benefits from this, and if so by how much.

You raise an interesting point that faultaround may be slow, and maybe
we should start out with 0 faultaround until we've determined (somehow)
that faultaround would be beneficial for this particular mapping. Like
we adjust the readahead window.

> For example when async RA won't be able to start,
> we might end up with a large mmap'ed file with 0-orders.

That is a feature, not a bug. If access is random, then we don't want
to do any async readahead because we don't know where the next access
will be. We just end up occupying large chunks of memory with
never-used data.