From: Matthew Wilcox <willy@infradead.org>
To: Shakeel Butt <shakeelb@google.com>
Cc: Roman Gushchin <guro@fb.com>, Vasily Averin <vvs@virtuozzo.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux MM <linux-mm@kvack.org>, Vlastimil Babka <vbabka@suse.cz>
Subject: Re: tools/cgroup/memcg_slabinfo.py is broken
Date: Thu, 17 Feb 2022 00:13:53 +0000 [thread overview]
Message-ID: <Yg2TQbpWen2SUP+l@casper.infradead.org> (raw)
In-Reply-To: <CALvZod5nqqt_9Xn0Yq4wiue_QePY5wz6BX6Vk2dH3P9qc92yPw@mail.gmail.com>
On Wed, Feb 16, 2022 at 03:57:39PM -0800, Shakeel Butt wrote:
> On Wed, Feb 16, 2022 at 3:12 PM Matthew Wilcox <willy@infradead.org> wrote:
> >
> [...]
> > > Here I'd keep _page (or _folio, if you want), because
> > > it makes it clear that the function goes over all pages
> > > (and is expensive therefore).
> >
> > But there's no intrinsic reason that it should. If that's a
> > performance problem, you could keep slabs on a separate list
> > from, eg, file or anon memory.
> >
>
> Is there enough space in the struct slab for that list or do you mean
> something different?
Well, I don't know what data structure your for_each_page() uses, so
I don't know what to suggest exactly.
If it's an iteration over the entirety of memmap, then maybe you'd
rather iterate over each kmem_cache like /proc/slabinfo does?
next prev parent reply other threads:[~2022-02-17 0:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 13:22 tools/cgroup/memcg_slabinfo.py is broken Vasily Averin
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 [this message]
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=Yg2TQbpWen2SUP+l@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=linux-mm@kvack.org \
--cc=shakeelb@google.com \
--cc=vbabka@suse.cz \
--cc=vvs@virtuozzo.com \
/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;
as well as URLs for NNTP newsgroup(s).