selftests: cgroup: fix test_kmem_memcg_deletion kernel mem check
authorLucas Karpinski <lkarpins@redhat.com>
Thu, 17 Aug 2023 19:57:48 +0000 (15:57 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 24 Aug 2023 23:20:27 +0000 (16:20 -0700)
commit7131fd7e30b20c3de03ca5d674546675dfffce5f
tree2715bd4a0aa215baf45f903d10bc0e112ee4e2ef
parent004a9a38e20da6eb88fbfb7eeff0f3dd8a01776a
selftests: cgroup: fix test_kmem_memcg_deletion kernel mem check

Currently, not all kernel memory usage is being accounted for. This
commit switches to using the kernel entry within memory.stat which
already includes kernel_stack, pagetables, and slab. The kernel entry
also includes vmalloc and other additional kernel memory use cases which
were missing.

Link: https://lkml.kernel.org/r/bvrhe2tpsts2azaroq4ubp2slawmop6orndsswrewuscw3ugvk@kmemmrttsnc7
Signed-off-by: Lucas Karpinski <lkarpins@redhat.com>
Acked-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Zefan Li <lizefan.x@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/cgroup/test_kmem.c