Re: [PATCH] mm: memcontrol: remove kmemcg_id reparenting

From: Roman Gushchin
Date: Mon Oct 25 2021 - 13:19:23 EST


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 <songmuchun@xxxxxxxxxxxxx>

Acked-by: Roman Gushchin <guro@xxxxxx>

Thanks!