From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Hao Li <hao.li@linux.dev>, harry@kernel.org
Cc: akpm@linux-foundation.org, cl@gentwo.org, rientjes@google.com,
roman.gushchin@linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/slub: unify slub stat definitions to simplify metric additions
Date: Mon, 7 Sep 2026 17:03:06 +0200 [thread overview]
Message-ID: <0afd7bf5-a059-4cf2-b9cf-e028b4eb86dd@kernel.org> (raw)
In-Reply-To: <20260814071848.46922-1-hao.li@linux.dev>
On 8/14/26 09:17, Hao Li wrote:
> Currently, adding a new slub stat requires modifying three separate
> locations: stat_item, STAT_ATTR, and slab_attrs. This is inconvenient,
> especially when temporarily adding metrics for debugging during
> development.
>
> This patch borrows the approach from SCHED_FEAT by introducing an ITEM_EXP
> X-macro, which is then temporarily defined as different operations at the
> three locations (stat_item, STAT_ATTR, and slab_attrs) to perform distinct
> macro expansions.
>
> Going forward, adding a new metric only requires adding a single line:
> ITEM_EXP(XXX, xxx)
>
> Signed-off-by: Hao Li <hao.li@linux.dev>
Nice, thanks! Added to mm/slab.git slab/for-7.4/misc -> slab/for-next
prev parent reply other threads:[~2026-09-07 15:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 7:17 Hao Li
2026-09-07 14:22 ` Harry Yoo
2026-09-07 15:03 ` Vlastimil Babka (SUSE) [this message]
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=0afd7bf5-a059-4cf2-b9cf-e028b4eb86dd@kernel.org \
--to=vbabka@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
/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
all inboxes | Powered by JetHome®