Re: [PATCH v5 03/17] mm/mglru: make generation page counters atomic

From: Barry Song

Date: Thu Nov 19 2026 - 14:44:48 EST


On Thu, Nov 19, 2026 at 5:03 AM Kairui Song via B4 Relay
<devnull+kasong.tencent.com@xxxxxxxxxx> wrote:
>
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> No feature change, convert them to atomic so we can update them without
> holding the LRU lock. A temporary underflow is fine: readers clamp a
> negative value to zero, and the counters only need to be eventually
> consistent.
>
> Tested-by: Zhao Zhenzhuo <zhaozhengzhuo@xxxxxxxxxxxxx>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>

LGTM,

Reviewed-by: Barry Song <baohua@xxxxxxxxxx>

> ---
> include/linux/mm_inline.h | 6 ++----
> include/linux/mmzone.h | 2 +-
> mm/vmscan.c | 26 +++++++++++++-------------
> mm/vmscan.h | 2 +-
> 4 files changed, 17 insertions(+), 19 deletions(-)