Re: [patch] SLQB slab allocator (try 2)

From: Christoph Lameter
Date: Thu Feb 19 2009 - 09:28:20 EST


What could be changed in the patch is to set SLUB_MAX_SIZE depending on
the page size of the underlying architecture.

#define SLUB_MAX_SIZE MAX(PAGE_SIZE, 8192)

So on 4k architectures SLUB_MAX_SIZE is set to 8192 and on 16k or 64k
arches its set to PAGE_SIZE.

And then define

#define SLUB_MAX_KMALLOC_ORDER get_order(SLUB_MAX_SIZE)

which will be 1 on 4k arches and 0 on higher sized arches.

Then also the kmalloc array would need to be dimensioned using
SLUB_MAX_KMALLOC_ORDER.


The definition of SLUB_NAX_KMALLOC_ORDER could be a bit challenging for
the C compiler.

--
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/