Re: [PATCH mm-new v2] mm: mglru: clear the reference counter for rejected folios

From: Barry Song

Date: Mon Sep 14 2026 - 05:39:28 EST


On Mon, Sep 14, 2026 at 4:51 PM Kairui Song <ryncsn@xxxxxxxxx> wrote:
>
[...]
> >
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index c2eb8fa9d5e5..a1ead7c61054 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -5071,10 +5071,13 @@ static int evict_folios(unsigned long
> > nr_to_scan, struct lruvec *lruvec,
> > continue;
> > }
> >
> > - /* See the comments on LRU_REFS_FLAGS */
> > + /*
> > + * See the comments on LRU_REFS_FLAGS.
> > + *
> > + * The rejected folios are never added to the oldest
> > generation,
> > + * so this effectively promotes them by at least one
> > generation.
> > + */
>
> It looks good to me, thanks!

+1, with the above change,

Reviewed-by: Barry Song <baohua@xxxxxxxxxx>