--- mm/slub.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2008-02-15 13:59:15.143645141 -0800 +++ linux-2.6/mm/slub.c 2008-02-15 14:02:44.572684899 -0800 @@ -156,24 +156,8 @@ static inline void ClearSlabDebug(struct #define SLUB_FASTPATH #endif -#if PAGE_SHIFT <= 12 - -/* - * Small page size. Make sure that we do not fragment memory - */ -#define DEFAULT_MAX_ORDER 1 -#define DEFAULT_MIN_OBJECTS 4 - -#else - -/* - * Large page machines are customarily able to handle larger - * page orders. - */ -#define DEFAULT_MAX_ORDER 2 -#define DEFAULT_MIN_OBJECTS 8 - -#endif +#define DEFAULT_MIN_OBJECTS 30 +#define DEFAULT_MAX_ORDER 5 /* * Mininum number of partial slabs. These will be left on the partial @@ -211,8 +195,6 @@ static inline void ClearSlabDebug(struct /* Internal SLUB flags */ #define __OBJECT_POISON 0x80000000 /* Poison object */ #define __SYSFS_ADD_DEFERRED 0x40000000 /* Not yet visible via sysfs */ -#define __KMALLOC_CACHE 0x20000000 /* objects freed using kfree */ -#define __PAGE_ALLOC_FALLBACK 0x10000000 /* Allow fallback to page alloc */ /* Not all arches define cache_line_size */ #ifndef cache_line_size @@ -3631,6 +3613,7 @@ static void process_slab(struct loc_trac unsigned long objects = slab_objects(s, page); DECLARE_BITMAP(map, objects); void *p; + unsigned long max_objects; bitmap_zero(map, objects); for_each_free_object(p, s, page->freelist)