]> git.ipfire.org Git - people/arne_f/kernel.git/commit
tools/cgroup/slabinfo.py: updated to work on current kernel
authorVasily Averin <vvs@virtuozzo.com>
Fri, 23 Apr 2021 21:29:03 +0000 (14:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 May 2021 09:11:24 +0000 (11:11 +0200)
commit7c734a2e2829c586ecd1d6916a0ac5629770d7c6
tree7b7e158d31aab8b4709707777a4ea69b59496975
parentb6c687a18d84ff2ec5a2d3ab3c9b3d334fc5a3e8
tools/cgroup/slabinfo.py: updated to work on current kernel

[ Upstream commit 1974c45dd7745e999b9387be3d8fdcb27a5b1721 ]

slabinfo.py script does not work with actual kernel version.

First, it was unable to recognise SLUB susbsytem, and when I specified
it manually it failed again with

  AttributeError: 'struct page' has no member 'obj_cgroups'

.. and then again with

  File "tools/cgroup/memcg_slabinfo.py", line 221, in main
    memcg.kmem_caches.address_of_(),
  AttributeError: 'struct mem_cgroup' has no member 'kmem_caches'

Link: https://lkml.kernel.org/r/cec1a75e-43b4-3d64-2084-d9f98fda037f@virtuozzo.com
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Tested-by: Roman Gushchin <guro@fb.com>
Acked-by: Roman Gushchin <guro@fb.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/cgroup/memcg_slabinfo.py