linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@virtuozzo.com>
To: Linux MM <linux-mm@kvack.org>
Cc: Roman Gushchin <guro@fb.com>,
	Matthew Wilcox <willy@infradead.org>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: tools/cgroup/memcg_slabinfo.py is broken
Date: Tue, 15 Feb 2022 16:22:14 +0300	[thread overview]
Message-ID: <327b9e92-88bb-d66f-e07c-526161db539b@virtuozzo.com> (raw)

Dear all,

commit 07f910f9b729 ("mm: Remove slab from struct page")
broke tools/cgroup/memcg_slabinfo.py script.
It was used as replacement of /psys/fs/cgroup/memory/memory.kmem.slabinfo
and was used to monitor slab objects related to specified cgroup

# ./memcg_slabinfo.py /sys/fs/cgroup/memory/lxc.payload.c9s/
# name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
Traceback (most recent call last):
   File "/usr/bin/drgn", line 33, in <module>
     sys.exit(load_entry_point('drgn==0.0.16', 'console_scripts', 'drgn')())
   File "/usr/lib64/python3.10/site-packages/drgn/internal/cli.py", line 133, in main
     runpy.run_path(args.script[0], init_globals=init_globals, run_name="__main__")
   File "/usr/lib64/python3.10/runpy.py", line 269, in run_path
     return _run_module_code(code, init_globals, run_name,
   File "/usr/lib64/python3.10/runpy.py", line 96, in _run_module_code
     _run_code(code, mod_globals, init_globals,
   File "/usr/lib64/python3.10/runpy.py", line 86, in _run_code
     exec(code, run_globals)
   File "./memcg_slabinfo.py", line 226, in <module>
     main()
   File "./memcg_slabinfo.py", line 199, in main
     cache = page.slab_cache
AttributeError: 'struct page' has no member 'slab_cache'

Any ideas how to repair it ?

Thank you,
	Vasily Averin


             reply	other threads:[~2022-02-15 13:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 13:22 Vasily Averin [this message]
2022-02-15 23:29 ` Roman Gushchin
     [not found]   ` <35486a00-791c-3b1b-14e0-476e6242709b@virtuozzo.com>
     [not found]     ` <Yg1kFH3umdrvOhu1@carbon.dhcp.thefacebook.com>
2022-02-16 21:12       ` Matthew Wilcox
2022-02-16 21:44         ` Roman Gushchin
     [not found]           ` <Yg1y0ax5bnjGLAqz@casper.infradead.org>
     [not found]             ` <Yg16ClVQj8SLSlqV@carbon.DHCP.thefacebook.com>
2022-02-16 23:12               ` Matthew Wilcox
2022-02-16 23:57                 ` Shakeel Butt
2022-02-17  0:13                   ` Matthew Wilcox
2022-02-17  0:25                     ` Roman Gushchin
     [not found]                     ` <Yg2cKKnIboNu7j+p@carbon.DHCP.thefacebook.com>
     [not found]                       ` <11060a75-98c2-f547-68eb-fcab404a2539@virtuozzo.com>
2022-02-21  9:19                         ` Vlastimil Babka
2022-02-21 13:27                       ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=327b9e92-88bb-d66f-e07c-526161db539b@virtuozzo.com \
    --to=vvs@virtuozzo.com \
    --cc=guro@fb.com \
    --cc=linux-mm@kvack.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox