[QUICKLIST 6/6] slub: remove special casing for PAGE_SIZE slabs

From: Christoph Lameter
Date: Sat Mar 10 2007 - 21:11:35 EST


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.

This is against SLUB V5

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

Index: linux-2.6.21-rc3/mm/slub.c
===================================================================
--- linux-2.6.21-rc3.orig/mm/slub.c 2007-03-09 21:23:39.000000000 -0800
+++ linux-2.6.21-rc3/mm/slub.c 2007-03-09 21:24:23.000000000 -0800
@@ -1236,16 +1236,6 @@
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 @@

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