Re: [PATCH v9 10/16] mm/mglru: Run aging when pages are rare outside the youngest gen
From: Barry Song
Date: Mon Nov 16 2026 - 00:30:06 EST
On Mon, Nov 16, 2026 at 12:50 PM Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Mon, 16 Nov 2026 12:25:56 +0800 "Barry Song (Xiaomi)" <baohua@xxxxxxxxxx> wrote:
>
> > On Sun, Nov 15, 2026 at 11:55 PM Kairui Song <ryncsn@xxxxxxxxx> wrote:
> > [...]
> > >
> > > A little nit: with the rounding above, I think we don't need youngest
> > > / old as an array, just an accumulative value seems enough now? But
> > > feel free to ignore this so we can avoid more update noise in this
> > > series.
> >
> > Makes sense to me!
> >
> > I guess Andrew could help squash the cleanup below into the patch?
>
> yep.
>
> > As suggested by Kairui[1], we don't need youngest and old as
> > array. just an accumulative value should be enough.
> >
> > No functional change.
>
> It got a bit messy because the later "mm/mglru: restrict eviction
> accounting to eligible zones" alters this code also, but I think I
> figured it out. And I might have accidentally fixed an 80-col thing
> while in there ;)
Thanks very much!
>
> Here's the end-of-series result - please check. It compiles!
>
Yes, that's correct!
I checked the code line by line and also asked three AI models
to double-check it. They all confirmed that it was identical to
my local code, apart from formatting differences.
I then ran another test with the code to rule out any possible
hallucinations on my part or from the three AI models, and
everything still worked fine.
So, Acked-by from me.
Thanks,
Barry