Messages in this thread | | | Date | Tue, 20 Apr 2004 11:25:56 -0700 | From | Andrew Morton <> | Subject | Re: 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/
| |