[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87cy8jz6od.fsf@linux.dev>
Date: Mon, 25 Aug 2025 09:50:58 -0700
From: Roman Gushchin <roman.gushchin@...ux.dev>
To: Jan Kara <jack@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, "Matthew Wilcox (Oracle)"
<willy@...radead.org>
Subject: Re: [PATCH] mm: readahead: improve mmap_miss heuristic for
concurrent faults
Jan Kara <jack@...e.cz> writes:
> On Fri 15-08-25 11:32:24, Roman Gushchin wrote:
>> If two or more threads of an application faulting on the same folio,
>> the mmap_miss counter can be decreased multiple times. It breaks the
>> mmap_miss heuristic and keeps the readahead enabled even under extreme
>> levels of memory pressure.
>>
>> It happens often if file folios backing a multi-threaded application
>> are getting evicted and re-faulted.
>>
>> Fix it by skipping decreasing mmap_miss if the folio is locked.
>>
>> This change was evaluated on several hundred thousands hosts in Google's
>> production over a couple of weeks. The number of containers being
>> stuck in a vicious reclaim cycle for a long time was reduced several
>> fold (~10-20x), as well as the overall fleet-wide cpu time spent in
>> direct memory reclaim was meaningfully reduced. No regressions were
>> observed.
>>
>> Signed-off-by: Roman Gushchin <roman.gushchin@...ux.dev>
>> Cc: Matthew Wilcox (Oracle) <willy@...radead.org>
>> Cc: Jan Kara <jack@...e.cz>
>> Cc: linux-mm@...ck.org
>
> Looks good! Feel free to add:
>
> Reviewed-by: Jan Kara <jack@...e.cz>
Thank you!
Powered by blists - more mailing lists