From: Roman Gushchin <guro@fb.com>
To: Vasily Averin <vvs@virtuozzo.com>
Cc: Linux MM <linux-mm@kvack.org>,
Matthew Wilcox <willy@infradead.org>,
Vlastimil Babka <vbabka@suse.cz>
Subject: Re: tools/cgroup/memcg_slabinfo.py is broken
Date: Tue, 15 Feb 2022 15:29:46 -0800 [thread overview]
Message-ID: <Ygw3au+tPdg2MXYT@carbon.dhcp.thefacebook.com> (raw)
In-Reply-To: <327b9e92-88bb-d66f-e07c-526161db539b@virtuozzo.com>
On Tue, Feb 15, 2022 at 04:22:14PM +0300, Vasily Averin wrote:
> 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
Thanks for the report, Vasily!
I'll take a look, we need to update the script according to the latest
slab/page/folio changes.
next prev parent reply other threads:[~2022-02-15 23:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 13:22 Vasily Averin
2022-02-15 23:29 ` Roman Gushchin [this message]
[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=Ygw3au+tPdg2MXYT@carbon.dhcp.thefacebook.com \
--to=guro@fb.com \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
--cc=vvs@virtuozzo.com \
--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