From 41ab8592ca35a20580665cae18c172816236b21e Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Wed, 16 Jul 2008 21:29:02 +0400 Subject: [PATCH 1/2] SLUB: simplify re on_each_cpu() on_each_cpu() expands to function call on UP, too. Acked-by: Christoph Lameter Signed-off-by: Alexey Dobriyan Signed-off-by: Pekka Enberg --- mm/slub.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 35ab38a94b4..6cd9fec18f9 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1495,15 +1495,7 @@ static void flush_cpu_slab(void *d) static void flush_all(struct kmem_cache *s) { -#ifdef CONFIG_SMP on_each_cpu(flush_cpu_slab, s, 1); -#else - unsigned long flags; - - local_irq_save(flags); - flush_cpu_slab(s); - local_irq_restore(flags); -#endif } /* From 0ebd652b35e988c0be3390e49b39cc064ba1cfce Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sat, 19 Jul 2008 14:17:22 +0300 Subject: [PATCH 2/2] slub: dump more data on slab corruption The limit of 128 bytes is too small when debugging slab corruption of the skb cache, for example. So increase the limit to PAGE_SIZE to make debugging corruptions easier. Acked-by: Ingo Molnar Acked-by: Christoph Lameter Signed-off-by: Pekka Enberg --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 6cd9fec18f9..6d4a49c1ff2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -492,7 +492,7 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) if (p > addr + 16) print_section("Bytes b4", p - 16, 16); - print_section("Object", p, min(s->objsize, 128)); + print_section("Object", p, min_t(unsigned long, s->objsize, PAGE_SIZE)); if (s->flags & SLAB_RED_ZONE) print_section("Redzone", p + s->objsize,