summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter2011-03-22 19:35:00 +0100
committerPekka Enberg2011-03-22 19:48:04 +0100
commit4fdccdfbb4652a7bbac8adbce7449eb093775118 (patch)
treeff780cfea8087ea4143b1a2186257448f0bad3bb /mm/slub.c
parentslub: Add missing irq restore for the OOM path (diff)
downloadkernel-qcow2-linux-4fdccdfbb4652a7bbac8adbce7449eb093775118.tar.gz
kernel-qcow2-linux-4fdccdfbb4652a7bbac8adbce7449eb093775118.tar.xz
kernel-qcow2-linux-4fdccdfbb4652a7bbac8adbce7449eb093775118.zip
slub: Add statistics for this_cmpxchg_double failures
Add some statistics for debugging. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index e126cfbd3df2..93de30db95f5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -217,7 +217,7 @@ static inline void sysfs_slab_remove(struct kmem_cache *s)
#endif
-static inline void stat(struct kmem_cache *s, enum stat_item si)
+static inline void stat(const struct kmem_cache *s, enum stat_item si)
{
#ifdef CONFIG_SLUB_STATS
__this_cpu_inc(s->cpu_slab->stat[si]);
@@ -1597,6 +1597,7 @@ static inline void note_cmpxchg_failure(const char *n,
printk("for unknown reason: actual=%lx was=%lx target=%lx\n",
actual_tid, tid, next_tid(tid));
#endif
+ stat(s, CMPXCHG_DOUBLE_CPU_FAIL);
}
#endif