]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
My load tests on PowerPC freeze within minutes in __slab_free(). I
authorHugh Dickins <hughd@google.com>
Tue, 26 Jul 2011 10:14:35 +0000 (20:14 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 28 Jul 2011 02:56:21 +0000 (12:56 +1000)
happened to try PPC first, didn't try without this fix on x86.

It looks as if the author was interrupted while devising the new
cmpxchg_double_slab() version of __slab_free(): its decision to
spin_lock_irqsave() depends on several uninitialized fields, and fixing
that (by copying page to new) mostly fixes it.

But I didn't think about it very much, and this may well not be what the
author intends; and I have seen a couple of much rarer freezes in
__slab_free() on PPC (not yet on x86) even after applying this.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slub.c

index eb5a8f93338a1819d026dedf71d9db452c3c62cf..119c850b81e3784937f557c340b46e534482c732 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2326,6 +2326,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
                return;
 
        do {
+               new = *page;
                prior = page->freelist;
                counters = page->counters;
                set_freepointer(s, object, prior);