From: Christoph Lameter <[EMAIL PROTECTED]> Date: Wed, 28 Feb 2007 17:06:19 -0800 (PST)
> On Wed, 28 Feb 2007, David Miller wrote: > > > Arguably SLAB_HWCACHE_ALIGN and SLAB_MUST_HWCACHE_ALIGN should > > not be set here, but SLUBs change in semantics in this area > > could cause similar grief in other areas, an audit is probably > > in order. > > > > The above example was from sparc64, but x86 does the same thing > > as probably do other platforms which use SLAB for pagetables. > > Maybe this will address these concerns? > > Index: linux-2.6.21-rc2/mm/slub.c > =================================================================== > --- linux-2.6.21-rc2.orig/mm/slub.c 2007-02-28 16:54:23.000000000 -0800 > +++ linux-2.6.21-rc2/mm/slub.c 2007-02-28 17:03:54.000000000 -0800 > @@ -1229,8 +1229,10 @@ static int calculate_order(int size) > static unsigned long calculate_alignment(unsigned long flags, > unsigned long align) > { > - if (flags & (SLAB_MUST_HWCACHE_ALIGN|SLAB_HWCACHE_ALIGN)) > + if (flags & SLAB_HWCACHE_ALIGN) > return L1_CACHE_BYTES; > + if (flags & SLAB_MUST_HWCACHE_ALIGN) > + return max(align, (unsigned long)L1_CACHE_BYTES); > > if (align < ARCH_SLAB_MINALIGN) > return ARCH_SLAB_MINALIGN; It would achiever parity with existing SLAB behavior, sure. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/