Skip to content

Commit 23587f7

Browse files
MiaoheLintehcaster
authored andcommitted
mm/slub: remove unused kmem_cache_order_objects max
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> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Link: https://lore.kernel.org/r/20220429090545.33413-1-linmiaohe@huawei.com
1 parent 3364778 commit 23587f7

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

include/linux/slub_def.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ struct kmem_cache {
105105
struct kmem_cache_order_objects oo;
106106

107107
/* Allocation and freeing of slabs */
108-
struct kmem_cache_order_objects max;
109108
struct kmem_cache_order_objects min;
110109
gfp_t allocflags; /* gfp flags to use on each alloc */
111110
int refcount; /* Refcount for slab cache destroy */

mm/slub.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4165,8 +4165,6 @@ static int calculate_sizes(struct kmem_cache *s)
41654165
*/
41664166
s->oo = oo_make(order, size);
41674167
s->min = oo_make(get_order(size), size);
4168-
if (oo_objects(s->oo) > oo_objects(s->max))
4169-
s->max = s->oo;
41704168

41714169
return !!oo_objects(s->oo);
41724170
}

0 commit comments

Comments
 (0)