lkml.org 
[lkml]   [2004]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: slab-alignment-rework.patch in -mc
Manfred Spraul <manfred@colorfullife.com> wrote:
>
> Andrea Arcangeli wrote:
>
> >On Tue, Apr 20, 2004 at 12:24:23AM -0700, Andrew Morton wrote:
> >
> >
> >>So I do think that we should either make "align=0" translate to "pack them
> >>densely" or do the big sweep across all kmem_cache_create() callsites.
> >>
> >>
> >
> >agreed.
> >
> >
> What about this proposal:
> SLAB_HWCACHE_ALIGN clear: align to max(sizeof(void*), align).
> SLAB_HWCACHE_ALIGN set: align to max(cpu_align(), align).
>
> cpu_align is the cpu cache line size - either runtime or compile time.
>
> Or are there users that want an alignment smaller than sizeof(void*)?

I doubt if this is likely to cause problems, and in cases where we expect
to have really large numbers of objects we could explicitly select an
alignment of 4 anyway.

But why would you choose to make the "SLAB_HWCACHE_ALIGN clear" case use
sizeof(void*) rather than sizeof(int)?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.033 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site