SLUB: Treat SLAB_HWCACHE_ALIGN as a mininum and not as *the* alignment If the specified alignment is higher than L1_CACHE_BYTES and SLAB_HWCACHE_ALIGN is set then use the higher alignment. Signed-off-by: Christoph Lameter Index: linux-2.6.21-rc5-mm4/mm/slub.c =================================================================== --- linux-2.6.21-rc5-mm4.orig/mm/slub.c 2007-04-04 10:09:20.000000000 -0700 +++ linux-2.6.21-rc5-mm4/mm/slub.c 2007-04-04 10:09:42.000000000 -0700 @@ -1373,10 +1373,7 @@ static int calculate_order(int size) static unsigned long calculate_alignment(unsigned long flags, unsigned long align) { - if (flags & SLAB_HWCACHE_ALIGN) - return L1_CACHE_BYTES; - - if (flags & SLAB_MUST_HWCACHE_ALIGN) + if (flags & (SLAB_MUST_HWCACHE_ALIGN | SLAB_HWCACHE_ALIGN)) return max_t(unsigned long, align, L1_CACHE_BYTES); if (align < ARCH_SLAB_MINALIGN)