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

Christoph Lameter
2008-03-05T20:56:56Z

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