* [PATCH] mm/slub: remove unused kmem_cache_order_objects max
@ 2022-04-29 9:05 Miaohe Lin
2022-04-29 9:48 ` Vlastimil Babka
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Miaohe Lin @ 2022-04-29 9:05 UTC (permalink / raw)
To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka
Cc: roman.gushchin, linux-mm, linux-kernel, linmiaohe
max field holds the largest slab order that was ever used for a slab cache.
But it's unused now. Remove it.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
include/linux/slub_def.h | 1 -
mm/slub.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 33c5c0e3bd8d..f9c68a9dac04 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -105,7 +105,6 @@ struct kmem_cache {
struct kmem_cache_order_objects oo;
/* Allocation and freeing of slabs */
- struct kmem_cache_order_objects max;
struct kmem_cache_order_objects min;
gfp_t allocflags; /* gfp flags to use on each alloc */
int refcount; /* Refcount for slab cache destroy */
diff --git a/mm/slub.c b/mm/slub.c
index 1f699ddfff7f..e5535020e0fd 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4162,8 +4162,6 @@ static int calculate_sizes(struct kmem_cache *s)
*/
s->oo = oo_make(order, size);
s->min = oo_make(get_order(size), size);
- if (oo_objects(s->oo) > oo_objects(s->max))
- s->max = s->oo;
return !!oo_objects(s->oo);
}
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/slub: remove unused kmem_cache_order_objects max
2022-04-29 9:05 [PATCH] mm/slub: remove unused kmem_cache_order_objects max Miaohe Lin
@ 2022-04-29 9:48 ` Vlastimil Babka
2022-04-29 11:38 ` Muchun Song
2022-05-02 0:07 ` David Rientjes
2 siblings, 0 replies; 4+ messages in thread
From: Vlastimil Babka @ 2022-04-29 9:48 UTC (permalink / raw)
To: Miaohe Lin, cl, penberg, rientjes, iamjoonsoo.kim, akpm
Cc: roman.gushchin, linux-mm, linux-kernel
On 4/29/22 11:05, Miaohe Lin wrote:
> max field holds the largest slab order that was ever used for a slab cache.
> But it's unused now. Remove it.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Added to slab tree, thanks.
> ---
> include/linux/slub_def.h | 1 -
> mm/slub.c | 2 --
> 2 files changed, 3 deletions(-)
>
> diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
> index 33c5c0e3bd8d..f9c68a9dac04 100644
> --- a/include/linux/slub_def.h
> +++ b/include/linux/slub_def.h
> @@ -105,7 +105,6 @@ struct kmem_cache {
> struct kmem_cache_order_objects oo;
>
> /* Allocation and freeing of slabs */
> - struct kmem_cache_order_objects max;
> struct kmem_cache_order_objects min;
> gfp_t allocflags; /* gfp flags to use on each alloc */
> int refcount; /* Refcount for slab cache destroy */
> diff --git a/mm/slub.c b/mm/slub.c
> index 1f699ddfff7f..e5535020e0fd 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -4162,8 +4162,6 @@ static int calculate_sizes(struct kmem_cache *s)
> */
> s->oo = oo_make(order, size);
> s->min = oo_make(get_order(size), size);
> - if (oo_objects(s->oo) > oo_objects(s->max))
> - s->max = s->oo;
>
> return !!oo_objects(s->oo);
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/slub: remove unused kmem_cache_order_objects max
2022-04-29 9:05 [PATCH] mm/slub: remove unused kmem_cache_order_objects max Miaohe Lin
2022-04-29 9:48 ` Vlastimil Babka
@ 2022-04-29 11:38 ` Muchun Song
2022-05-02 0:07 ` David Rientjes
2 siblings, 0 replies; 4+ messages in thread
From: Muchun Song @ 2022-04-29 11:38 UTC (permalink / raw)
To: Miaohe Lin
Cc: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka,
roman.gushchin, linux-mm, linux-kernel
On Fri, Apr 29, 2022 at 05:05:45PM +0800, Miaohe Lin wrote:
> max field holds the largest slab order that was ever used for a slab cache.
> But it's unused now. Remove it.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Nice cleanup.
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/slub: remove unused kmem_cache_order_objects max
2022-04-29 9:05 [PATCH] mm/slub: remove unused kmem_cache_order_objects max Miaohe Lin
2022-04-29 9:48 ` Vlastimil Babka
2022-04-29 11:38 ` Muchun Song
@ 2022-05-02 0:07 ` David Rientjes
2 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2022-05-02 0:07 UTC (permalink / raw)
To: Miaohe Lin
Cc: cl, penberg, iamjoonsoo.kim, akpm, vbabka, roman.gushchin,
linux-mm, linux-kernel
On Fri, 29 Apr 2022, Miaohe Lin wrote:
> max field holds the largest slab order that was ever used for a slab cache.
> But it's unused now. Remove it.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-02 0:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 9:05 [PATCH] mm/slub: remove unused kmem_cache_order_objects max Miaohe Lin
2022-04-29 9:48 ` Vlastimil Babka
2022-04-29 11:38 ` Muchun Song
2022-05-02 0:07 ` David Rientjes
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 NNTP newsgroup(s).