Re: [PATCH 1/8] mm/mglru: consolidate common code for retrieving evitable size
From: Kairui Song
Date: Wed Mar 18 2026 - 06:00:32 EST
On Wed, Mar 18, 2026 at 5:47 PM Barry Song <21cnbao@xxxxxxxxx> wrote:
>
> On Wed, Mar 18, 2026 at 3:11 AM Kairui Song via B4 Relay
> <devnull+kasong.tencent.com@xxxxxxxxxx> wrote:
> >
> > From: Kairui Song <kasong@xxxxxxxxxxx>
> >
> > Merge commonly used code for counting evictable folios in a lruvec.
> >
> > No behavior change.
> >
> > Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
>
> Reviewed-by: Barry Song <baohua@xxxxxxxxxx>
>
Hi Barry,
Thanks for the review.
> [...]
> > static long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, int swappiness)
> > {
> > - bool success;
> > + bool need_aging;
>
> Nice! Many times, I’ve been in the process of submitting a patch
> to rename this `success`, as its current name is completely
> unreadable and unclear in meaning.
>
> Another `success`also needs some cleanup.
> I mean this one:
Good suggestion. Perhaps I better split it into a standalone patch
with your suggested-by, will include such a patch in V2.