lkml.org 
[lkml]   [2008]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment
On Thu, Mar 06, 2008 at 02:53:11PM -0800, Christoph Lameter wrote:
> 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.

It doesn't align small objects to cacheline boundaries in either allocator.
The regression is just because slub can support smaller sizes of objects
AFAIKS.


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

Patch 3/3


> SLAB_HWCACHE_MUST_ALIGN or so at some point but it was rarely to never
> used.

OK, but that's not the same thing.


> Note that there is also KMEM_CACHE which picks up the alignment from
> the compiler.

Yeah, that's not quite as good either. My allocation flag is dynamic, so
it will not bloat things for no reason on UP machines and SMP kernels.
It also aligns to the detected machine cacheline size rather than a
compile time constant.



\
 
 \ /
  Last update: 2008-03-07 03:07    [W:0.119 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site