Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment

From: Nick Piggin
Date: Wed Mar 05 2008 - 21:49:31 EST


On Wed, Mar 05, 2008 at 12:56:33PM -0800, Christoph Lameter wrote:
> On Wed, 5 Mar 2008, Nick Piggin wrote:
>
> > It started out as a SLUB regression that was exposing poor code in the
> > percpu allocator due to different SLUB kmalloc alignments. That prompted
>
> That was due to SLUB's support for smaller allocation sizes. AFAICT has
> nothing to do with alignment.

The smaller sizes meant objects were less often aligned on cacheline
boundaries.


> > The SMP flag was just an RFC. I think some people (like Christoph) were
> > being confused about the HWCACHE_ALIGN flag being for avoiding false
> > sharing on SMP systems. It would actually be also generally useful to
> > have the SMP flag (eg. see the sites I added it to in patch #3).
>
> Hmmm. We could define a global constant for that? Determine it on bootup
> and then pass it as an alignment parameter?

We could, but I'd rather just use the flag.

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