diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 19:26:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 19:26:57 -0400 |
commit | 01ba82514603593bb11589e2ea2afdeba1921636 (patch) | |
tree | c66c762ac6bb98c450e6852aee914e883449c488 | |
parent | ab70a1d7c7fc6665d83f41b5ce790ff8376e0b81 (diff) | |
parent | 4fdccdfbb4652a7bbac8adbce7449eb093775118 (diff) |
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
slub: Add statistics for this_cmpxchg_double failures
slub: Add missing irq restore for the OOM path
-rw-r--r-- | include/linux/slub_def.h | 1 | ||||
-rw-r--r-- | mm/slub.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 90fbb6d87e11..45ca123e8002 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -32,6 +32,7 @@ enum stat_item { | |||
32 | DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ | 32 | DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ |
33 | DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ | 33 | DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ |
34 | ORDER_FALLBACK, /* Number of times fallback was necessary */ | 34 | ORDER_FALLBACK, /* Number of times fallback was necessary */ |
35 | CMPXCHG_DOUBLE_CPU_FAIL,/* Failure of this_cpu_cmpxchg_double */ | ||
35 | NR_SLUB_STAT_ITEMS }; | 36 | NR_SLUB_STAT_ITEMS }; |
36 | 37 | ||
37 | struct kmem_cache_cpu { | 38 | struct kmem_cache_cpu { |
@@ -217,7 +217,7 @@ static inline void sysfs_slab_remove(struct kmem_cache *s) | |||
217 | 217 | ||
218 | #endif | 218 | #endif |
219 | 219 | ||
220 | static inline void stat(struct kmem_cache *s, enum stat_item si) | 220 | static inline void stat(const struct kmem_cache *s, enum stat_item si) |
221 | { | 221 | { |
222 | #ifdef CONFIG_SLUB_STATS | 222 | #ifdef CONFIG_SLUB_STATS |
223 | __this_cpu_inc(s->cpu_slab->stat[si]); | 223 | __this_cpu_inc(s->cpu_slab->stat[si]); |
@@ -1597,6 +1597,7 @@ static inline void note_cmpxchg_failure(const char *n, | |||
1597 | printk("for unknown reason: actual=%lx was=%lx target=%lx\n", | 1597 | printk("for unknown reason: actual=%lx was=%lx target=%lx\n", |
1598 | actual_tid, tid, next_tid(tid)); | 1598 | actual_tid, tid, next_tid(tid)); |
1599 | #endif | 1599 | #endif |
1600 | stat(s, CMPXCHG_DOUBLE_CPU_FAIL); | ||
1600 | } | 1601 | } |
1601 | 1602 | ||
1602 | #endif | 1603 | #endif |
@@ -1857,6 +1858,9 @@ new_slab: | |||
1857 | } | 1858 | } |
1858 | if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit()) | 1859 | if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit()) |
1859 | slab_out_of_memory(s, gfpflags, node); | 1860 | slab_out_of_memory(s, gfpflags, node); |
1861 | #ifdef CONFIG_CMPXCHG_LOCAL | ||
1862 | local_irq_restore(flags); | ||
1863 | #endif | ||
1860 | return NULL; | 1864 | return NULL; |
1861 | debug: | 1865 | debug: |
1862 | if (!alloc_debug_processing(s, c->page, object, addr)) | 1866 | if (!alloc_debug_processing(s, c->page, object, addr)) |