From: Michal Hocko <mhocko@suse.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: xiongwei.song@windriver.com, hannes@cmpxchg.org,
shakeelb@google.com, muchun.song@linux.dev,
akpm@linux-foundation.org, cgroups@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/memcontrol: add tips for kmem.slabinfo
Date: Tue, 8 Aug 2023 09:29:54 +0200 [thread overview]
Message-ID: <ZNHu8m3h3ckn+HeI@dhcp22.suse.cz> (raw)
In-Reply-To: <ZNG9vwg1K6fn1SvN@P9FQF9L96D>
On Mon 07-08-23 20:59:59, Roman Gushchin wrote:
> On Tue, Aug 08, 2023 at 10:22:29AM +0800, xiongwei.song@windriver.com wrote:
> > From: Xiongwei Song <xiongwei.song@windriver.com>
> >
> > No any output from kmem.slabinfo, which is not friendly. Adding
> > tips for it.
> >
> > Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
> > ---
> > mm/memcontrol.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index e8ca4bdcb03c..58d3bd93890b 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -5002,10 +5002,8 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
> > #if defined(CONFIG_MEMCG_KMEM) && (defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG))
> > static int mem_cgroup_slab_show(struct seq_file *m, void *p)
> > {
> > - /*
> > - * Deprecated.
> > - * Please, take a look at tools/cgroup/memcg_slabinfo.py .
> > - */
> > + seq_puts(m, "This file is deprecated.\n"
> > + "Please use tools/cgroup/memcg_slabinfo.py, which is in kernel source.\n");
>
> It'll break the ABI.
Agreed
> The only possible option here is to use WARN_ON_ONCE(), which will print once to dmesg.
> But honestly I'm not sure we need it.
There are systems with panic_on_warn configured. I do not think we want
those to go down just becasue some random tool tries to read this file.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2023-08-08 7:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 2:22 xiongwei.song
2023-08-08 2:47 ` Matthew Wilcox
2023-08-08 12:10 ` Xiongwei Song
2023-08-08 3:59 ` Roman Gushchin
2023-08-08 7:29 ` Michal Hocko [this message]
2023-08-08 12:08 ` Xiongwei Song
2023-08-08 12:08 ` Xiongwei Song
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=ZNHu8m3h3ckn+HeI@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@google.com \
--cc=xiongwei.song@windriver.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