Re: + slub-faster-more-efficient-slab-determination-for-__kmalloc.patchadded to -mm tree

From: Christoph Lameter
Date: Thu Jun 21 2007 - 14:51:20 EST


The loop to disable slabs can use step 8. Looks a bit strange the way it
is now.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>

---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.22-rc4-mm2/mm/slub.c
===================================================================
--- linux-2.6.22-rc4-mm2.orig/mm/slub.c 2007-06-21 11:41:02.000000000 -0700
+++ linux-2.6.22-rc4-mm2/mm/slub.c 2007-06-21 11:45:07.000000000 -0700
@@ -2606,7 +2606,7 @@ void __init kmem_cache_init(void)
BUG_ON(KMALLOC_MIN_SIZE > 256 ||
(KMALLOC_MIN_SIZE & (KMALLOC_MIN_SIZE - 1)));

- for (i = 8; i < KMALLOC_MIN_SIZE;i++)
+ for (i = 8; i < KMALLOC_MIN_SIZE; i += 8)
size_index[(i - 1) / 8] = KMALLOC_SHIFT_LOW;

slab_state = UP;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/