Re: [PATCH 1/8] mm/mglru: consolidate common code for retrieving evitable size

Kairui Song
2026-03-18T09:58:34Z

On Wed, Mar 18, 2026 at 5:47 PM Barry Song <21cnbao@gmail.com> wrote:
>
> On Wed, Mar 18, 2026 at 3:11 AM Kairui Song via B4 Relay
> <devnull+kasong.tencent.com@kernel.org> wrote:
> >
> > From: Kairui Song <kasong@tencent.com>
> >
> > Merge commonly used code for counting evictable folios in a lruvec.
> >
> > No behavior change.
> >
> > Signed-off-by: Kairui Song <kasong@tencent.com>
>
> Reviewed-by: Barry Song <baohua@kernel.org>
>

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.