Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276043
b: refs/heads/master
c: bc6697d
h: refs/heads/master
i:
  276041: 5e021e6
  276039: 2f217b7
v: v3
  • Loading branch information
Eric Dumazet authored and Pekka Enberg committed Nov 24, 2011
1 parent 488fd30 commit 28ccd4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42d623a8cd08eb93ab221d22cee5a62618895bbf
refs/heads/master: bc6697d8a506dedf09e8e9974ffa3a316183e608
21 changes: 11 additions & 10 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -4444,30 +4444,31 @@ static ssize_t show_slab_objects(struct kmem_cache *s,

for_each_possible_cpu(cpu) {
struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu);
int node = ACCESS_ONCE(c->node);
struct page *page;

if (!c || c->node < 0)
if (node < 0)
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)
x = c->page->inuse;
x = page->inuse;
else
x = 1;

total += x;
nodes[c->node] += x;
nodes[node] += x;
}
page = c->partial;

if (page) {
x = page->pobjects;
total += x;
nodes[c->node] += x;
total += x;
nodes[node] += x;
}
per_cpu[c->node]++;
per_cpu[node]++;
}
}

Expand Down

0 comments on commit 28ccd4e

Please sign in to comment.