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

Christoph Lameter
2008-03-06T22:53:41Z

On Thu, 6 Mar 2008, Nick Piggin wrote:

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

Right since SLAB_HWCACHE_ALIGN does not align for very small objects.

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

Do you have a case in mind where that would be useful? We had a
SLAB_HWCACHE_MUST_ALIGN or so at some point but it was rarely to never
used. Note that there is also KMEM_CACHE which picks up the alignment from
the compiler.