Skip to content

Commit e35e1a9

Browse files
Chen Gangpenberg
authored andcommitted
mm/slub: remove 'per_cpu' which is useless variable
Remove 'per_cpu', since it is useless now after the patch: "205ab99 slub: Update statistics handling for variable order slabs". And the partial list is handled in the same way as the per cpu slab. Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
1 parent ad81f05 commit e35e1a9

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎mm/slub.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4271,12 +4271,10 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
42714271
int node;
42724272
int x;
42734273
unsigned long *nodes;
4274-
unsigned long *per_cpu;
42754274

4276-
nodes = kzalloc(2 * sizeof(unsigned long) * nr_node_ids, GFP_KERNEL);
4275+
nodes = kzalloc(sizeof(unsigned long) * nr_node_ids, GFP_KERNEL);
42774276
if (!nodes)
42784277
return -ENOMEM;
4279-
per_cpu = nodes + nr_node_ids;
42804278

42814279
if (flags & SO_CPU) {
42824280
int cpu;
@@ -4307,8 +4305,6 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
43074305
total += x;
43084306
nodes[node] += x;
43094307
}
4310-
4311-
per_cpu[node]++;
43124308
}
43134309
}
43144310

0 commit comments

Comments
 (0)