summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-04 09:48:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-04 09:48:21 -0700
commit3ea9eed49346eb80f17f1c6539c47dc508be1173 (patch)
treea3e82cc6e3deded667a7eda071894c1ddf079db7 /include
parent852bb9f594e0ea737f83487962a040ad210e8a13 (diff)
parent41d54d3bf83f62d3ff5948cb788fe6007e66a0d0 (diff)
downloadlinux-3ea9eed49346eb80f17f1c6539c47dc508be1173.tar.bz2
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: Do not use 192 byte sized cache if minimum alignment is 128 byte
Diffstat (limited to 'include')
-rw-r--r--include/linux/slub_def.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 71e43a12ebbb..cef6f8fddd7d 100644
--- a/include/linux/slub_def.h
+++ b/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;