LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 -next] mm/slub: remove dummy slabinfo functions
@ 2024-03-21 13:17 Xiu Jianfeng
  2024-03-23 20:30 ` David Rientjes
  2024-03-25  8:37 ` Vlastimil Babka
  0 siblings, 2 replies; 3+ messages in thread
From: Xiu Jianfeng @ 2024-03-21 13:17 UTC (permalink / raw
  To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka,
	roman.gushchin, 42.hyeyoo
  Cc: linux-mm, linux-kernel, xiujianfeng

From: Xiu Jianfeng <xiujianfeng@huawei.com>

The SLAB implementation has been removed since 6.8, so there is no
other version of slabinfo_show_stats() and slabinfo_write(), then we
can remove these two dummy functions.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
v2: correct removed version
---
 mm/slab.h        |  3 ---
 mm/slab_common.c |  2 --
 mm/slub.c        | 10 ----------
 3 files changed, 15 deletions(-)

diff --git a/mm/slab.h b/mm/slab.h
index d2bc9b191222..78e205b46e19 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -496,9 +496,6 @@ struct slabinfo {
 };
 
 void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo);
-void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s);
-ssize_t slabinfo_write(struct file *file, const char __user *buffer,
-		       size_t count, loff_t *ppos);
 
 #ifdef CONFIG_SLUB_DEBUG
 #ifdef CONFIG_SLUB_DEBUG_ON
diff --git a/mm/slab_common.c b/mm/slab_common.c
index f5234672f03c..67c03d6bd26c 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1078,7 +1078,6 @@ static void cache_show(struct kmem_cache *s, struct seq_file *m)
 		   sinfo.limit, sinfo.batchcount, sinfo.shared);
 	seq_printf(m, " : slabdata %6lu %6lu %6lu",
 		   sinfo.active_slabs, sinfo.num_slabs, sinfo.shared_avail);
-	slabinfo_show_stats(m, s);
 	seq_putc(m, '\n');
 }
 
@@ -1155,7 +1154,6 @@ static const struct proc_ops slabinfo_proc_ops = {
 	.proc_flags	= PROC_ENTRY_PERMANENT,
 	.proc_open	= slabinfo_open,
 	.proc_read	= seq_read,
-	.proc_write	= slabinfo_write,
 	.proc_lseek	= seq_lseek,
 	.proc_release	= seq_release,
 };
diff --git a/mm/slub.c b/mm/slub.c
index 1bb2a93cf7b6..cc7e68fbdbba 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -7099,14 +7099,4 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
 	sinfo->objects_per_slab = oo_objects(s->oo);
 	sinfo->cache_order = oo_order(s->oo);
 }
-
-void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s)
-{
-}
-
-ssize_t slabinfo_write(struct file *file, const char __user *buffer,
-		       size_t count, loff_t *ppos)
-{
-	return -EIO;
-}
 #endif /* CONFIG_SLUB_DEBUG */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 -next] mm/slub: remove dummy slabinfo functions
  2024-03-21 13:17 [PATCH v2 -next] mm/slub: remove dummy slabinfo functions Xiu Jianfeng
@ 2024-03-23 20:30 ` David Rientjes
  2024-03-25  8:37 ` Vlastimil Babka
  1 sibling, 0 replies; 3+ messages in thread
From: David Rientjes @ 2024-03-23 20:30 UTC (permalink / raw
  To: Xiu Jianfeng
  Cc: cl, penberg, iamjoonsoo.kim, akpm, vbabka, roman.gushchin,
	42.hyeyoo, linux-mm, linux-kernel, xiujianfeng

On Thu, 21 Mar 2024, Xiu Jianfeng wrote:

> From: Xiu Jianfeng <xiujianfeng@huawei.com>
> 
> The SLAB implementation has been removed since 6.8, so there is no
> other version of slabinfo_show_stats() and slabinfo_write(), then we
> can remove these two dummy functions.
> 
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 -next] mm/slub: remove dummy slabinfo functions
  2024-03-21 13:17 [PATCH v2 -next] mm/slub: remove dummy slabinfo functions Xiu Jianfeng
  2024-03-23 20:30 ` David Rientjes
@ 2024-03-25  8:37 ` Vlastimil Babka
  1 sibling, 0 replies; 3+ messages in thread
From: Vlastimil Babka @ 2024-03-25  8:37 UTC (permalink / raw
  To: Xiu Jianfeng, cl, penberg, rientjes, iamjoonsoo.kim, akpm,
	roman.gushchin, 42.hyeyoo
  Cc: linux-mm, linux-kernel, xiujianfeng

On 3/21/24 2:17 PM, Xiu Jianfeng wrote:
> From: Xiu Jianfeng <xiujianfeng@huawei.com>
> 
> The SLAB implementation has been removed since 6.8, so there is no
> other version of slabinfo_show_stats() and slabinfo_write(), then we
> can remove these two dummy functions.
> 
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>

Thanks, added to slab/for-6.10/cleanup

> ---
> v2: correct removed version
> ---
>  mm/slab.h        |  3 ---
>  mm/slab_common.c |  2 --
>  mm/slub.c        | 10 ----------
>  3 files changed, 15 deletions(-)
> 
> diff --git a/mm/slab.h b/mm/slab.h
> index d2bc9b191222..78e205b46e19 100644
> --- a/mm/slab.h
> +++ b/mm/slab.h
> @@ -496,9 +496,6 @@ struct slabinfo {
>  };
>  
>  void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo);
> -void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s);
> -ssize_t slabinfo_write(struct file *file, const char __user *buffer,
> -		       size_t count, loff_t *ppos);
>  
>  #ifdef CONFIG_SLUB_DEBUG
>  #ifdef CONFIG_SLUB_DEBUG_ON
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index f5234672f03c..67c03d6bd26c 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -1078,7 +1078,6 @@ static void cache_show(struct kmem_cache *s, struct seq_file *m)
>  		   sinfo.limit, sinfo.batchcount, sinfo.shared);
>  	seq_printf(m, " : slabdata %6lu %6lu %6lu",
>  		   sinfo.active_slabs, sinfo.num_slabs, sinfo.shared_avail);
> -	slabinfo_show_stats(m, s);
>  	seq_putc(m, '\n');
>  }
>  
> @@ -1155,7 +1154,6 @@ static const struct proc_ops slabinfo_proc_ops = {
>  	.proc_flags	= PROC_ENTRY_PERMANENT,
>  	.proc_open	= slabinfo_open,
>  	.proc_read	= seq_read,
> -	.proc_write	= slabinfo_write,
>  	.proc_lseek	= seq_lseek,
>  	.proc_release	= seq_release,
>  };
> diff --git a/mm/slub.c b/mm/slub.c
> index 1bb2a93cf7b6..cc7e68fbdbba 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -7099,14 +7099,4 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
>  	sinfo->objects_per_slab = oo_objects(s->oo);
>  	sinfo->cache_order = oo_order(s->oo);
>  }
> -
> -void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s)
> -{
> -}
> -
> -ssize_t slabinfo_write(struct file *file, const char __user *buffer,
> -		       size_t count, loff_t *ppos)
> -{
> -	return -EIO;
> -}
>  #endif /* CONFIG_SLUB_DEBUG */


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-25  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 13:17 [PATCH v2 -next] mm/slub: remove dummy slabinfo functions Xiu Jianfeng
2024-03-23 20:30 ` David Rientjes
2024-03-25  8:37 ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).