diff options
author | Christoph Lameter <cl@linux.com> | 2011-11-23 09:14:38 -0600 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-11-24 08:44:14 +0200 |
commit | 42d623a8cd08eb93ab221d22cee5a62618895bbf (patch) | |
tree | c2bc80e3b59253f3d4c9e81e608ba59d15a5bf0e | |
parent | 9ada19342b2441f290f0043ed7c562682c8c4ede (diff) | |
download | linux-42d623a8cd08eb93ab221d22cee5a62618895bbf.tar.gz linux-42d623a8cd08eb93ab221d22cee5a62618895bbf.tar.bz2 linux-42d623a8cd08eb93ab221d22cee5a62618895bbf.zip |
slub: use irqsafe_cpu_cmpxchg for put_cpu_partial
The cmpxchg must be irq safe. The fallback for this_cpu_cmpxchg only
disables preemption which results in per cpu partial page operation
potentially failing on non x86 platforms.
This patch fixes the following problem reported by Christian Kujau:
I seem to hit it with heavy disk & cpu IO is in progress on this
PowerBook
G4. Full dmesg & .config: http://nerdbynature.de/bits/3.2.0-rc1/oops/
I've enabled some debug options and now it really points to slub.c:2166
http://nerdbynature.de/bits/3.2.0-rc1/oops/oops4m.jpg
With debug options enabled I'm currently in the xmon debugger, not sure
what to make of it yet, I'll try to get something useful out of it :)
Reported-by: Christian Kujau <lists@nerdbynature.de>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c index 00efbb56a268..2a9cfd72a3d7 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1978,7 +1978,7 @@ int put_cpu_partial(struct kmem_cache *s, struct page *page, int drain) page->pobjects = pobjects; page->next = oldpage; - } while (this_cpu_cmpxchg(s->cpu_slab->partial, oldpage, page) != oldpage); + } while (irqsafe_cpu_cmpxchg(s->cpu_slab->partial, oldpage, page) != oldpage); stat(s, CPU_PARTIAL_FREE); return pobjects; } |