From: Christoph Lameter To: Pekka Enberg Cc: Mel Gorman Cc: Nick Piggin Cc: Andrew Morton Cc: linux-mm@kback.org Subject: SLUB: cleanups, 4k alloc solution etc. Subject-Prefix: [patch @num@/@total@] [Sorry resend: Did my typical linux-mm@vger typo. Sigh] This is a series of patches that address various issues in slub. Patch 1 just does some cleanup by moving gfp flag determination into slab creation. Patch 2 introduces fallback for kmalloc caches. We already pass all allocs >=4k to the page allocator. We can do that for any kmalloc allocation if any higher order alloc fails. Patch 2 makes the kmalloc-2048 be able to fall back to an order 0 alloc and also makes kmalloc-2048 use order 3 allocs by default so that the cache has the maximum number of fastpaths for one trip taken on the page allocator slowpath. Patch 3 extend the kmalloc caches of slub to also cover kmalloc-4096. With that the tbench regression is addressed without having to rewrite the page allocator (seems to be necessary) and I hope that this can be merged for 2.6.25. kmalloc-4096 will also use order 3 page allocations and fall back to single page allocs if the higher order alloc fails. Patch 4 fixes a small issue if slub is configured to use huge pages. Treats huge pages as MOVABLE allocations in the same way as the huge page subsystem. Not a huge thing so I thought about putting that into mm for now. Patch 5 extend the fallback to non kmalloc caches. Also only for mm. Requires a new check in the kmem_cache_free fastpath but allows higher number of objects per allocation unit(and thus more fastpath use) for many slab caches that currently use order 1 allocs in addition to be able to fallback to an order 0 alloc from the page allocator if the higher order alloc fails.