All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Seongjun Hong <hsj0512@snu.ac.kr>, Harry Yoo <harry@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: 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, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] slab: remove unused SL_CPU slab_stat_type
Date: Thu, 2 Jul 2026 10:15:26 +0200	[thread overview]
Message-ID: <5d23d39e-e2fc-461f-bc60-8300450eb43c@kernel.org> (raw)
In-Reply-To: <20260701140634.71608-1-hsj0512@snu.ac.kr>

On 7/1/26 16:06, Seongjun Hong wrote:
> Since the removal of the per-cpu slab in commit 32c894c7274b ("slab:
> remove struct kmem_cache_cpu"), show_slab_objects() no longer has a
> branch handling SO_CPU, so cpu_slabs_show() always produces "0".
> 
> Emit "0\n" directly instead, matching the sibling cpu_partial and
> slabs_cpu_partial stubs, and remove the now-unused SO_CPU macro and
> SL_CPU enum value.
> 
> No functional change intended; the cpu_slabs sysfs attribute continues
> to read 0.
> 
> Signed-off-by: Seongjun Hong <hsj0512@snu.ac.kr>

Applied to slab/for-next, thanks!

> ---
>  mm/slub.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index 9ec774dc7009..f2eb60ce0d23 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -8992,14 +8992,12 @@ static void process_slab(struct loc_track *t, struct kmem_cache *s,
>  enum slab_stat_type {
>  	SL_ALL,			/* All slabs */
>  	SL_PARTIAL,		/* Only partially allocated slabs */
> -	SL_CPU,			/* Only slabs used for cpu caches */
>  	SL_OBJECTS,		/* Determine allocated objects not slabs */
>  	SL_TOTAL		/* Determine object capacity not slabs */
>  };
>  
>  #define SO_ALL		(1 << SL_ALL)
>  #define SO_PARTIAL	(1 << SL_PARTIAL)
> -#define SO_CPU		(1 << SL_CPU)
>  #define SO_OBJECTS	(1 << SL_OBJECTS)
>  #define SO_TOTAL	(1 << SL_TOTAL)
>  
> @@ -9188,7 +9186,7 @@ SLAB_ATTR_RO(partial);
>  
>  static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf)
>  {
> -	return show_slab_objects(s, buf, SO_CPU);
> +	return sysfs_emit(buf, "0\n");
>  }
>  SLAB_ATTR_RO(cpu_slabs);
>  


      parent reply	other threads:[~2026-07-02  8:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 14:06 [PATCH] slab: remove unused SL_CPU slab_stat_type Seongjun Hong
2026-07-02  4:31 ` Harry Yoo
2026-07-02  6:24 ` Hao Li
2026-07-02  8:15 ` 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=5d23d39e-e2fc-461f-bc60-8300450eb43c@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=hsj0512@snu.ac.kr \
    --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 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.