The patch titled NUMA slab allocator migration bugfix has been added to the -mm tree. Its filename is numa-slab-allocator-migration-bugfix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: NUMA slab allocator migration bugfix From: Joe Korty <joe.korty@xxxxxxxx> NUMA slab allocator cpu migration bugfix The NUMA slab allocator (specifically, cache_alloc_refill) is not refreshing its local copies of what cpu and what numa node it is on, when it drops and reacquires the irq block that it inherited from its caller. As a result those values become invalid if an attempt to migrate the process to another numa node occured while the irq block had been dropped. The solution is to make cache_alloc_refill reload these variables whenever it drops and reacquires the irq block. The error is very difficult to hit. When it does occur, one gets the following oops + stack traceback bits in check_spinlock_acquired: kernel BUG at mm/slab.c:2417 cache_alloc_refill+0xe6 kmem_cache_alloc+0xd0 ... Signed-off-by: Joe Korty <joe.korty@xxxxxxxx> Acked-by: Christoph Lameter <clameter@xxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN mm/slab.c~numa-slab-allocator-migration-bugfix mm/slab.c --- a/mm/slab.c~numa-slab-allocator-migration-bugfix +++ a/mm/slab.c @@ -2960,11 +2960,10 @@ static void *cache_alloc_refill(struct k struct array_cache *ac; int node; - node = numa_node_id(); - +retry: check_irq_off(); + node = numa_node_id(); ac = cpu_cache_get(cachep); -retry: batchcount = ac->batchcount; if (!ac->touched && batchcount > BATCHREFILL_LIMIT) { /* _ Patches currently in -mm which might be from joe.korty@xxxxxxxx are numa-slab-allocator-migration-bugfix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html