[lkml]   [2020]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH v2 27/28] tools/cgroup: make compatible with new slab controller
On Mon, Jan 27, 2020 at 09:34:52AM -0800, Roman Gushchin wrote:
> Make compatible with the new slab controller.

Tried using, but run into some errors. (I am using your
new_slab.2 branch)

./tools/cgroup/ /sys/fs/cgroup/memory/1
Traceback (most recent call last):
File "/usr/local/bin/drgn", line 11, in <module>
File "/usr/local/lib/python3.6/dist-packages/drgn/internal/", line 127, in main
runpy.run_path(args.script[0], init_globals=init_globals, run_name="__main__")
File "/usr/lib/python3.6/", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/lib/python3.6/", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib/python3.6/", line 85, in _run_code
exec(code, run_globals)
File "./tools/cgroup/", line 220, in <module>
File "./tools/cgroup/", line 165, in main
File "./tools/cgroup/", line 43, in find_memcg_ids
MEMCGS[] = memcg
AttributeError: '_drgn.Object' object has no attribute 'ino'

I did make this change...

# git diff
diff --git a/tools/cgroup/ b/tools/cgroup/
index b779a4863beb..571fd95224d6 100755
--- a/tools/cgroup/
+++ b/tools/cgroup/
@@ -40,7 +40,7 @@ def find_memcg_ids(css=prog['root_mem_cgroup'].css, prefix=''):
name = prefix + '/' +'utf-8')
memcg = container_of(css, 'struct mem_cgroup', 'css')
- MEMCGS[] = memcg
+ MEMCGS[] = memcg
find_memcg_ids(css, name)

but now get empty output.
# ./tools/cgroup/ /sys/fs/cgroup/memory/1
# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>

Guess this script is not yet ready for the upstream kernel?


 \ /
  Last update: 2020-01-30 03:20    [W:0.081 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site