Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297268
b: refs/heads/master
c: a8364d5
h: refs/heads/master
v: v3
  • Loading branch information
Gilad Ben-Yossef authored and Linus Torvalds committed Mar 29, 2012
1 parent c76262c commit f21feac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: b3a7e98e024ffa9f7e4554dd720c508015c4a831
refs/heads/master: a8364d5555b2030d093cde0f07951628e55454e1
10 changes: 9 additions & 1 deletion trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,9 +2028,17 @@ static void flush_cpu_slab(void *d)
__flush_cpu_slab(s, smp_processor_id());
}

static bool has_cpu_slab(int cpu, void *info)
{
struct kmem_cache *s = info;
struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu);

return !!(c->page);
}

static void flush_all(struct kmem_cache *s)
{
on_each_cpu(flush_cpu_slab, s, 1);
on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1, GFP_ATOMIC);
}

/*
Expand Down

0 comments on commit f21feac

Please sign in to comment.