Re: [PATCH 2/2] SLUB: increase the range of slab sizes available to kmalloc, allowing a somewhat more effient use of memory.

2012-10-15 Thread Christoph Lameter
On Sat, 13 Oct 2012, Richard Kennedy wrote: > -extern struct kmem_cache *kmalloc_caches[SLUB_PAGE_SHIFT]; > > -/* > - * Sorry that the following has to be that ugly but some versions of GCC > - * have trouble with constant propagation and loops. > +static const short __slab_sizes[] = {0, 8, 12, 16

[PATCH 2/2] SLUB: increase the range of slab sizes available to kmalloc, allowing a somewhat more effient use of memory.

2012-10-13 Thread Richard Kennedy
This patch add new slabs sized at 1.5 * 2^n. i.e - 24,48,96,192,384,768,1.5k,3k,6k Most of which already exist as kmem_cache slabs, except for 1.5k, 3k & 6k. There is no extra overhead for statically sized kmalloc, and only a small change for dynamically sized ones. Minimal code changes: