Re: [PATCH mm-hotfixses] Revert "mm: limit filemap_fault readahead to VMA boundaries"

From: Andrew Morton

Date: Mon Jun 22 2026 - 12:59:10 EST


On Mon, 22 Jun 2026 14:55:14 +0100 Lorenzo Stoakes <ljs@xxxxxxxxxx> wrote:

> > Anyway I agree with you using mmap-frame-by-frame approach for this usecase
> > is kind of odd but not completely insane and it does demostrate people do
> > odd things like this. For others the usecase of Android doing tons of small
> > sparse mmaps into executable might look odd as well :) So this seems to be
> > one of the cases where it's difficult to please everybody with the same
> > behavior and we usually stick to the legacy behavior in cases like that (as
> > much as I personally find restricting mmap readahead to a VMA a sensible
> > thing to do). We just need to figure out how to improve the Android
> > usecase.

Would a helpful heuristic be to do what 7b32f64bc512 is doing, but only
if PROT_EXEC?

> Reading the thread, I think we're all in agreement that this is a workload
> that exists and we are regressing it here, thus the revert is the right
> course of action.
>
> Andrew - could we move this to the hotfixes branch please?

No need? I'll send Linus the mm-stable batch #2 this week.