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
···137137 if (size <= KMALLOC_MIN_SIZE)138138 return KMALLOC_SHIFT_LOW;139139140140+#if KMALLOC_MIN_SIZE <= 64140141 if (size > 64 && size <= 96)141142 return 1;142143 if (size > 128 && size <= 192)143144 return 2;145145+#endif144146 if (size <= 8) return 3;145147 if (size <= 16) return 4;146148 if (size <= 32) return 5;
+10-2
mm/slub.c
···29952995 create_kmalloc_cache(&kmalloc_caches[1],29962996 "kmalloc-96", 96, GFP_KERNEL);29972997 caches++;29982998- }29992999- if (KMALLOC_MIN_SIZE <= 128) {30002998 create_kmalloc_cache(&kmalloc_caches[2],30012999 "kmalloc-192", 192, GFP_KERNEL);30023000 caches++;···3023302530243026 for (i = 8; i < KMALLOC_MIN_SIZE; i += 8)30253027 size_index[(i - 1) / 8] = KMALLOC_SHIFT_LOW;30283028+30293029+ if (KMALLOC_MIN_SIZE == 128) {30303030+ /*30313031+ * The 192 byte sized cache is not used if the alignment30323032+ * is 128 byte. Redirect kmalloc to use the 256 byte cache30333033+ * instead.30343034+ */30353035+ for (i = 128 + 8; i <= 192; i += 8)30363036+ size_index[(i - 1) / 8] = 8;30373037+ }3026303830273039 slab_state = UP;30283040