From: SeongJae Park <sj@kernel.org>
To: wangxuewen <18810879172@163.com>
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, wangxuewen <wangxuewen@kylinos.cn>
Subject: Re: [PATCH v1 1/3] tools/mm/slabinfo: Fix trace disable logic inversion
Date: Fri, 15 May 2026 16:58:16 -0700 [thread overview]
Message-ID: <20260515235817.136362-1-sj@kernel.org> (raw)
In-Reply-To: <20260515065325.4009527-2-18810879172@163.com>
Hello wangxuewen,
On Fri, 15 May 2026 14:53:23 +0800 wangxuewen <18810879172@163.com> wrote:
> The disable trace path in slab_debug() had a logic error where it would
> set trace=1 instead of trace=0. This made trace functionality permanently
> enabled once turned on for any slab cache.
Nice catch.
>
> Signed-off-by: wangxuewen <wangxuewen@kylinos.cn>
checkpatch.pl gives below warning. I think that should be fixed:
WARNING: From:/Signed-off-by: email address mismatch: 'From: wangxuewen <18810879172@163.com>' != 'Signed-off-by: wangxuewen <wangxuewen@kylinos.cn>'
Also, should we add Fixes: and Cc: stable@ to this patch?
Assuming the email address mismatch will be fixed (my second question is not a
blocking question),
Reviewed-by: SeongJae Park <sj@kernel.org>
> ---
> tools/mm/slabinfo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
> index 54c7265ab52d..39f7eae7eecd 100644
> --- a/tools/mm/slabinfo.c
> +++ b/tools/mm/slabinfo.c
> @@ -798,7 +798,7 @@ static void slab_debug(struct slabinfo *s)
> fprintf(stderr, "%s can only enable trace for one slab at a time\n", s->name);
> }
> if (!tracing && s->trace)
> - set_obj(s, "trace", 1);
> + set_obj(s, "trace", 0);
> }
I think it might make sense to use 'tracing' as the third argument. Just a
loud thought of my personal taste. I don't think that's what this patch should
do.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-05-15 23:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 6:53 [PATCH v1 0/3] Cleanup and fix tools/mm/slabinfo utility wangxuewen
2026-05-15 6:53 ` [PATCH v1 1/3] tools/mm/slabinfo: Fix trace disable logic inversion wangxuewen
2026-05-15 23:58 ` SeongJae Park [this message]
2026-05-15 6:53 ` [PATCH v1 2/3] tools/mm/slabinfo: remove dead assignment in get_obj_and_str() wangxuewen
2026-05-16 0:02 ` SeongJae Park
2026-05-15 6:53 ` [PATCH v1 3/3] tools/mm/slabinfo: remove redundant slab->partial assignment wangxuewen
2026-05-16 0:04 ` SeongJae Park
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=20260515235817.136362-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=18810879172@163.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangxuewen@kylinos.cn \
/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