CONFIG_DEBUG_SLAB broken on SMP
Quoted 5 lines
The problem appears to be in the SMP version of
__kmem_cache_alloc()and__kmem_cache_free(), where it simply sticks the obj in the per-CPU list without doing the poison or redzone stuff that is done insidekmem_cache_free_one_tail().
The simplest solution is to skip the code that enables the per-cpu caches if debugging is enabled:
Search for enable_all_cpucaches in mm/slab.c, and skip the call if DEBUG is enabled.
2.5.41-mm1 contains a partially rewritten slab, which performs the poisoning before adding an object into the cpu caches. Additionally, even caches with constructors are not poisoned - ctor and dtor calls are performed in kmem_cache_alloc/free.
--
Manfred
Quoted 4 lines · Manfred Spraul
2.5.41-mm1 contains a partially rewritten slab, which performs the poisoning before adding an object into the cpu caches. Additionally, even caches with constructors are not poisoned - ctor and dtor calls are performed in kmem_cache_alloc/free.
On an unrelated note, I have a very tiny but useful (for me) feature request for the slab rewrite:
Can you make ctor return a success/failure code?
Thanks,
Bill