From 3b548e961b14a4f556d2dcdd262f0dc56c3c9438 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 4 Jul 2008 09:51:51 -0700 Subject: [PATCH] --- yaml --- r: 98668 b: refs/heads/master c: 638944adc169b3164399a7c1aa98bb48fa070e41 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/MAINTAINERS | 22 +++------------------- trunk/include/linux/slub_def.h | 2 ++ trunk/mm/slub.c | 12 ++++++++++-- 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index a71d682ad0f9..20effc3e86e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 50952026036c7b4212b90091bf23a264c0ccc1fb +refs/heads/master: 638944adc169b3164399a7c1aa98bb48fa070e41 diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index e6c06fa3290e..460e699fd280 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2474,9 +2474,11 @@ M: James.Bottomley@HansenPartnership.com W: http://www.hansenpartnership.com/voyager S: Maintained -LINUX FOR POWERPC +LINUX FOR POWERPC (32-BIT AND 64-BIT) P: Paul Mackerras M: paulus@samba.org +P: Benjamin Herrenschmidt +M: benh@kernel.crashing.org W: http://www.penguinppc.org/ L: linuxppc-dev@ozlabs.org T: git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git @@ -2516,13 +2518,6 @@ W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex L: linuxppc-dev@ozlabs.org S: Maintained -LINUX FOR POWERPC BOOT CODE -P: Tom Rini -M: trini@kernel.crashing.org -W: http://www.penguinppc.org/ -L: linuxppc-dev@ozlabs.org -S: Maintained - LINUX FOR POWERPC EMBEDDED PPC8XX P: Vitaly Bordug M: vitb@kernel.crashing.org @@ -2551,17 +2546,6 @@ P: Arnaldo Carvalho de Melo M: acme@ghostprotocols.net S: Maintained -LINUX FOR 64BIT POWERPC -P: Paul Mackerras -M: paulus@samba.org -M: paulus@au.ibm.com -P: Anton Blanchard -M: anton@samba.org -M: anton@au.ibm.com -W: http://www.penguinppc.org/ppc64/ -L: linuxppc-dev@ozlabs.org -S: Supported - LINUX SECURITY MODULE (LSM) FRAMEWORK P: Chris Wright M: chrisw@sous-sol.org diff --git a/trunk/include/linux/slub_def.h b/trunk/include/linux/slub_def.h index 71e43a12ebbb..cef6f8fddd7d 100644 --- a/trunk/include/linux/slub_def.h +++ b/trunk/include/linux/slub_def.h @@ -137,10 +137,12 @@ static __always_inline int kmalloc_index(size_t size) if (size <= KMALLOC_MIN_SIZE) return KMALLOC_SHIFT_LOW; +#if KMALLOC_MIN_SIZE <= 64 if (size > 64 && size <= 96) return 1; if (size > 128 && size <= 192) return 2; +#endif if (size <= 8) return 3; if (size <= 16) return 4; if (size <= 32) return 5; diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index 0987d1cd943c..2c9a62d1f429 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -2995,8 +2995,6 @@ void __init kmem_cache_init(void) create_kmalloc_cache(&kmalloc_caches[1], "kmalloc-96", 96, GFP_KERNEL); caches++; - } - if (KMALLOC_MIN_SIZE <= 128) { create_kmalloc_cache(&kmalloc_caches[2], "kmalloc-192", 192, GFP_KERNEL); caches++; @@ -3026,6 +3024,16 @@ void __init kmem_cache_init(void) for (i = 8; i < KMALLOC_MIN_SIZE; i += 8) size_index[(i - 1) / 8] = KMALLOC_SHIFT_LOW; + if (KMALLOC_MIN_SIZE == 128) { + /* + * The 192 byte sized cache is not used if the alignment + * is 128 byte. Redirect kmalloc to use the 256 byte cache + * instead. + */ + for (i = 128 + 8; i <= 192; i += 8) + size_index[(i - 1) / 8] = 8; + } + slab_state = UP; /* Provide the correct kmalloc names now that the caches are up */