|
@@ -4444,30 +4444,31 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
|
|
|
|
|
|
for_each_possible_cpu(cpu) {
|
|
for_each_possible_cpu(cpu) {
|
|
struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu);
|
|
struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu);
|
|
|
|
+ int node = ACCESS_ONCE(c->node);
|
|
struct page *page;
|
|
struct page *page;
|
|
|
|
|
|
- if (!c || c->node < 0)
|
|
|
|
|
|
+ if (node < 0)
|
|
continue;
|
|
continue;
|
|
-
|
|
|
|
- if (c->page) {
|
|
|
|
- if (flags & SO_TOTAL)
|
|
|
|
- x = c->page->objects;
|
|
|
|
|
|
+ page = ACCESS_ONCE(c->page);
|
|
|
|
+ if (page) {
|
|
|
|
+ if (flags & SO_TOTAL)
|
|
|
|
+ x = page->objects;
|
|
else if (flags & SO_OBJECTS)
|
|
else if (flags & SO_OBJECTS)
|
|
- x = c->page->inuse;
|
|
|
|
|
|
+ x = page->inuse;
|
|
else
|
|
else
|
|
x = 1;
|
|
x = 1;
|
|
|
|
|
|
total += x;
|
|
total += x;
|
|
- nodes[c->node] += x;
|
|
|
|
|
|
+ nodes[node] += x;
|
|
}
|
|
}
|
|
page = c->partial;
|
|
page = c->partial;
|
|
|
|
|
|
if (page) {
|
|
if (page) {
|
|
x = page->pobjects;
|
|
x = page->pobjects;
|
|
- total += x;
|
|
|
|
- nodes[c->node] += x;
|
|
|
|
|
|
+ total += x;
|
|
|
|
+ nodes[node] += x;
|
|
}
|
|
}
|
|
- per_cpu[c->node]++;
|
|
|
|
|
|
+ per_cpu[node]++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|