Re: [PATCH v5 7/7] mm: fix /proc/kpagecgroup interface for slab pages

From: Vladimir Davydov
Date: Tue May 28 2019 - 13:41:44 EST


On Tue, May 21, 2019 at 01:07:35PM -0700, Roman Gushchin wrote:
> Switching to an indirect scheme of getting mem_cgroup pointer for
> !root slab pages broke /proc/kpagecgroup interface for them.
>
> Let's fix it by learning page_cgroup_ino() how to get memcg
> pointer for slab pages.
>
> Reported-by: Shakeel Butt <shakeelb@xxxxxxxxxx>
> Signed-off-by: Roman Gushchin <guro@xxxxxx>
> Reviewed-by: Shakeel Butt <shakeelb@xxxxxxxxxx>
> ---
> mm/memcontrol.c | 5 ++++-
> mm/slab.h | 25 +++++++++++++++++++++++++
> mm/slab_common.c | 1 +
> 3 files changed, 30 insertions(+), 1 deletion(-)

What about mem_cgroup_from_kmem, see mm/list_lru.c?
Shouldn't we fix it, too?