Re: [PATCH] mm: skip dirty file folios during isolation
From: Zhaoyang Huang
Date: Wed Mar 18 2026 - 20:46:39 EST
On Wed, Mar 18, 2026 at 9:50 PM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
>
> 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);
Thanks for heads up. Just find out that dirty file pages have been
promoted to younger gen under MGLRU, will update the code in patchv2