Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Lameter and committed by
Pekka Enberg
4fdccdfb 2fd66c51

+3 -1
+1
include/linux/slub_def.h
··· 32 32 DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ 33 33 DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ 34 34 ORDER_FALLBACK, /* Number of times fallback was necessary */ 35 + CMPXCHG_DOUBLE_CPU_FAIL,/* Failure of this_cpu_cmpxchg_double */ 35 36 NR_SLUB_STAT_ITEMS }; 36 37 37 38 struct kmem_cache_cpu {
+2 -1
mm/slub.c
··· 217 217 218 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 222 #ifdef CONFIG_SLUB_STATS 223 223 __this_cpu_inc(s->cpu_slab->stat[si]); ··· 1597 1597 printk("for unknown reason: actual=%lx was=%lx target=%lx\n", 1598 1598 actual_tid, tid, next_tid(tid)); 1599 1599 #endif 1600 + stat(s, CMPXCHG_DOUBLE_CPU_FAIL); 1600 1601 } 1601 1602 1602 1603 #endif