Re: [PATCH v4 4/5] mm/mglru: avoid redundant rotations of young memcgs
From: Barry Song
Date: Mon Nov 23 2026 - 16:23:50 EST
On Mon, Nov 23, 2026 at 9:52 PM Max Kellermann <max.kellermann@xxxxxxxxx> wrote:
>
> Concurrent reclaimers can request promotion after another reclaimer
> has already moved a memcg into the young generation. Requeueing it
> into a random bin again adds list mutations without advancing the
> old-generation scan.
>
> Therefore, skip `MEMCG_LRU_YOUNG` when the memcg is already in the
> default segment of the current young generation.
>
> In my micro benchmark, this increases the request rate by 36% and
> reduces the average duration of each write request by 27%.
>
> Signed-off-by: Max Kellermann <max.kellermann@xxxxxxxxx>
> ---
Reviewed-by: Barry Song <baohua@xxxxxxxxxx>