Slub: Remove special casing for page sized slabs After we have used quicklist so that arches can avoid using the slab allocator to manage page table pages we can now remove the special casing from slub. Signed-off-by: Christoph Lameter --- mm/slub.c | 19 ------------------- 1 file changed, 19 deletions(-) Index: linux-2.6.21-rc3/mm/slub.c =================================================================== --- linux-2.6.21-rc3.orig/mm/slub.c 2007-03-12 22:35:09.000000000 -0700 +++ linux-2.6.21-rc3/mm/slub.c 2007-03-12 22:43:53.000000000 -0700 @@ -1236,16 +1236,6 @@ static int calculate_order(int size) int order; int rem; - /* - * If this is an order 0 page then there are no issues with - * fragmentation. We can then create a slab with a single object. - * We need this to support the i386 arch code that uses our - * freelist field (index field) for a list pointer. We neveri - * touch the freelist pointer if we just have one object - */ - if (size == PAGE_SIZE) - return 0; - for (order = max(slub_min_order, fls(size - 1) - PAGE_SHIFT); order < MAX_ORDER; order++) { unsigned long slab_size = PAGE_SIZE << order; @@ -1386,15 +1376,6 @@ static int kmem_cache_open(struct kmem_c tentative_size = ALIGN(size, calculate_alignment(align, flags)); - /* - * PAGE_SIZE slabs are special in that they are passed through - * to the page allocator. Do not do any debugging in order to avoid - * increasing the size of the object. - */ - if (size == PAGE_SIZE) - flags &= ~(SLAB_RED_ZONE| SLAB_DEBUG_FREE | \ - SLAB_STORE_USER | SLAB_POISON | __OBJECT_POISON); - s->name = name; s->ctor = ctor; s->dtor = dtor;