]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
slub: Switch per cpu partial page support off for debugging
authorChristoph Lameter <cl@linux.com>
Wed, 23 Nov 2011 15:24:27 +0000 (09:24 -0600)
committerPekka Enberg <penberg@kernel.org>
Tue, 13 Dec 2011 20:14:02 +0000 (22:14 +0200)
Eric saw an issue with accounting of slabs during validation. Its not
possible to determine accurately how many per cpu partial slabs exist at
any time so this switches off per cpu partial pages during debug.

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slub.c

index ed3334d9b6da77f64796f1933f7672284b159fc2..4056d29e66106d85a5b0eac54baeba9325af21c7 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3028,7 +3028,9 @@ static int kmem_cache_open(struct kmem_cache *s,
         *    per node list when we run out of per cpu objects. We only fetch 50%
         *    to keep some capacity around for frees.
         */
-       if (s->size >= PAGE_SIZE)
+       if (kmem_cache_debug(s))
+               s->cpu_partial = 0;
+       else if (s->size >= PAGE_SIZE)
                s->cpu_partial = 2;
        else if (s->size >= 1024)
                s->cpu_partial = 6;