From: sashiko-bot@kernel.org
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
"Harry Yoo" <harry@kernel.org>
Cc: "Chris Down" <chris@chrisdown.name>,
"Kees Cook" <kees@kernel.org>, "Hao Li" <hao.li@linux.dev>,
"Christoph Lameter" <cl@gentwo.org>,
"David Rientjes" <rientjes@google.com>,
"Roman Gushchin" <roman.gushchin@linux.dev>,
linux-mm@kvack.org
Subject: Re: [PATCH v2 3/3] mm/slab: drop BUCKET_PARAMS and KMALLOC_PARAMS macros
Date: Thu, 03 Dec 2026 14:42:58 +0000 [thread overview]
Message-ID: <sashiko-outbox-247998@kernel.org> (raw)
In-Reply-To: <20261203-kmalloc-entry-rework-v2-3-d718dc4fd906@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] mm/slab: leave unused DECL_TOKEN_PARAM and _PASS_TOKEN_PARAM
macros
- [Low] mm/slab: leave stale DECL_BUCKET_PARAMS entries in kdoc and
tests
--
commit 9da411099f8a63bf0f793cbe5e608f3a522dd3a7
Author: Vlastimil Babka (SUSE) <vbabka@kernel.org>
mm/slab: drop BUCKET_PARAMS and KMALLOC_PARAMS macros
This commit removes the BUCKET_PARAMS and KMALLOC_PARAMS macros and
switches the remaining kmalloc_node() and kvmalloc_node() entry points to
use TOKEN_PARAMS with a hardcoded NULL kmem_buckets pointer.
> diff --git a/include/linux/slab.h b/include/linux/slab.h
> index d9592e700d03f..8655778830adb 100644
> --- a/include/linux/slab.h
> +++ b/include/linux/slab.h
> @@ -933,27 +933,6 @@ void *kmem_cache_alloc_from_sheaf_noprof(struct kmem_cache *cachep, gfp_t gfp,
>
> unsigned int kmem_cache_sheaf_size(struct slab_sheaf *sheaf);
>
> -/*
> - * These macros allow declaring a kmem_buckets * parameter alongside size, which
> - * can be compiled out with CONFIG_SLAB_BUCKETS=n so that a large number of call
> - * sites don't have to pass NULL.
> - */
> -#ifdef CONFIG_SLAB_BUCKETS
> -#define DECL_BUCKET_PARAMS(_size, _b) size_t (_size), kmem_buckets *(_b)
> -#define PASS_BUCKET_PARAMS(_size, _b) (_size), (_b)
> -#define PASS_BUCKET_PARAM(_b) (_b)
> -#else
> -#define DECL_BUCKET_PARAMS(_size, _b) size_t (_size)
> -#define PASS_BUCKET_PARAMS(_size, _b) (_size)
> -#define PASS_BUCKET_PARAM(_b) NULL
> -#endif
[Severity: Low]
As reported by Hao Li on v1 [1], should the leftover DECL_BUCKET_PARAMS
entries also be removed from CTransforms.function_xforms in
tools/lib/python/kdoc/xforms_lists.py and
TestSubWithLocalXforms.function_xforms in
tools/unittests/test_cmatch.py? Neither file has any remaining users of
the deleted macro.
> -
> -#define DECL_KMALLOC_PARAMS(_size, _b, _token) DECL_BUCKET_PARAMS(_size, _b) \
> - DECL_TOKEN_PARAM(_token)
> -
> -#define PASS_KMALLOC_PARAMS(_size, _b, _token) PASS_BUCKET_PARAMS(_size, _b) \
> - _PASS_TOKEN_PARAM(_token)
[Severity: Low]
Can DECL_TOKEN_PARAM and _PASS_TOKEN_PARAM also be removed from both
CONFIG_KMALLOC_PARTITION_CACHES branches in include/linux/slab.h? With
DECL_KMALLOC_PARAMS and PASS_KMALLOC_PARAMS gone, they have no remaining
users in the tree.
[1] https://lore.kernel.org/r/awzv3V3ioGi1SQN6@fedora
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-kmalloc-entry-rework-v2-0-d718dc4fd906@kernel.org?part=3
prev parent reply other threads:[~2026-12-03 14:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 13:42 [PATCH v2 0/3] kmem_buckets entry point rework Vlastimil Babka (SUSE)
2026-12-03 13:42 ` [PATCH v2 1/3] mm/slab: add ___do_kmalloc_node() to deduplicate code Vlastimil Babka (SUSE)
2026-12-03 13:42 ` [PATCH v2 2/3] mm/slab: add own entry points for kmem_buckets_alloc() family Vlastimil Babka (SUSE)
2026-12-03 14:42 ` sashiko-bot
2026-12-03 13:42 ` [PATCH v2 3/3] mm/slab: drop BUCKET_PARAMS and KMALLOC_PARAMS macros Vlastimil Babka (SUSE)
2026-12-03 14:42 ` sashiko-bot [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=sashiko-outbox-247998@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chris@chrisdown.name \
--cc=cl@gentwo.org \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=kees@kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vbabka@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.