linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: xiongwei.song@windriver.com
Cc: hannes@cmpxchg.org, mhocko@kernel.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: Mon, 7 Aug 2023 20:59:59 -0700	[thread overview]
Message-ID: <ZNG9vwg1K6fn1SvN@P9FQF9L96D> (raw)
In-Reply-To: <20230808022229.1560559-1-xiongwei.song@windriver.com>

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.
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.

Thanks!


  parent reply	other threads:[~2023-08-08  4:00 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 [this message]
2023-08-08  7:29   ` Michal Hocko
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=ZNG9vwg1K6fn1SvN@P9FQF9L96D \
    --to=roman.gushchin@linux.dev \
    --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=mhocko@kernel.org \
    --cc=muchun.song@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