Re: [PATCH 4/8] mm/mglru: scan and count the exact number of folios
From: Kairui Song
Date: Tue Mar 24 2026 - 05:39:30 EST
On Tue, Mar 24, 2026 at 5:10 PM Chen Ridong <chenridong@xxxxxxxxxxxxxxx> wrote:
> On 2026/3/24 16:05, Kairui Song wrote:
> > Hi Ridong,
> >
> > Ahh yes, as you pointed out, the explicit should_run_aging kind of
> > guards the evict_folio. That's not everything, besides, previously
> > isolate_folios may return 0 if there is no folio isolated. But now it
> > always return the number of folios being scanned, unless there are
> > only two genes left and hit the force protection, which also makes the
> > judge here can be dropped.
> >
> > But not invoking evict_folios if aging is needed is an existing
> > behavior, that commit (patch 3) didn't change it, just made it cleaner
> > so we can see it well.
> >
>
> Thanks for the explanation.
>
> Would it be better to combine this change with patch 3, rather than adding to
> the commit message?
>
> --
> Best regards,
> Ridong
>
Hi Ridong, thanks for the suggestion.
Patch 3 is already a bit complex I think, so I split this out as a
separate patch so the review might be easier. Maybe I can try to merge
them later if they still look confusing in V2.