Re: [PATCH v4 2/6] mm/mglru: introduce helpers for manipulating gen and refs flags

From: Barry Song

Date: Tue Sep 01 2026 - 07:15:51 EST


On Mon, Aug 31, 2026 at 2:43 AM Kairui Song via B4 Relay
<devnull+kasong.tencent.com@xxxxxxxxxx> wrote:
>
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> Instead of doing bit ops on folio->flags.f, introduce helpers for
> adjusting a folio's refs and generation info, making the code easier
> to debug and understand.
>
> No functional change is intended: some combined atomic operations are
> split into two, which only creates harmless transient states. There is
> no measurable performance impact, and some paths even look slightly
> better in the generated assembly.
>
> Acked-by: Qi Zheng <qi.zheng@xxxxxxxxx>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
> ---

LGTM, thanks!

Reviewed-by: Barry Song <baohua@xxxxxxxxxx>