Re: [PATCH v3 3/5] mm/mglru: cache the last memcg node, make tail insertion constant time
From: Max Kellermann
Date: Mon Nov 23 2026 - 08:40:50 EST
On Mon, Nov 23, 2026 at 2:53 AM Barry Song <baohua@xxxxxxxxxx> wrote:
> So this is the case where the list is empty, right? Maybe add a
> WARN_ON_ONCE() check before this code to make the assumption explicit
> and catch potential violations in the future.
>
> VM_WARN_ON_ONCE(!last != hlist_nulls_empty(head));
Added, and I'll send v4 today.
--
Max Kellermann
Principal Architect
Hosting Technology
cm4all | Im Mediapark 6a | 50670 Köln | Germany
General information about the company can be found here:
https://www.cm4all.com/impressum
A member of the IONOS Group