Re: [PATCH] mm: skip dirty file folios during isolation
From: Johannes Weiner
Date: Wed Mar 18 2026 - 09:51:03 EST
On Wed, Mar 18, 2026 at 05:06:56PM +0800, zhaoyang.huang wrote:
> From: Zhaoyang Huang <zhaoyang.huang@xxxxxxxxxx>
>
> Since dirty file folios are no longer writeout in reclaiming after
> 'commit 84798514db50 ("mm: Remove swap_writepage() and
> shmem_writepage()")', there is no need to isolate them from LRU which
> could help to improve the scan efficiency.
The reclaim scanner needs to sample dirty state to coordinate if early
writeback is necessary:
try_to_shrink_lruvec():
/*
* If too many file cache in the coldest generation can't be evicted
* due to being dirty, wake up the flusher.
*/
if (sc->nr.unqueued_dirty && sc->nr.unqueued_dirty == sc->nr.file_taken)
wakeup_flusher_threads(WB_REASON_VMSCAN);