2021-10-25 17:24:38

by Roman Gushchin

[permalink] [raw]
Subject: Re: [PATCH] mm: memcontrol: remove kmemcg_id reparenting

On Mon, Oct 25, 2021 at 08:51:02PM +0800, Muchun Song wrote:
> Since slab objects and kmem pages are charged to object cgroup instead
> of memory cgroup, memcg_reparent_objcgs() will reparent this cgroup and
> all its descendants to its parent cgroup. This already makes further
> list_lru_add()'s add elements to the parent's list. So it is unnecessary
> to change kmemcg_id of an offline cgroup to its parent's id. It just
> wastes CPU cycles. Just to remove those redundant code.
>
> Signed-off-by: Muchun Song <[email protected]>

Acked-by: Roman Gushchin <[email protected]>

Thanks!