Messages in this thread | | | Date | Sat, 29 May 2004 08:57:27 +0200 | From | Manfred Spraul <> | Subject | Re: [RFC, PATCH] set SLAB_HWCACHE_ALIGN for kmalloc caches |
| |
Andrew Morton wrote:
>Manfred Spraul <manfred@colorfullife.com> wrote: > > >>I think the kmalloc caches should remain cache line aligned >> >> > >I'm not so sure. size-64 is used a lot for out-of-line dentry names. >Taking these up to 128 bytes or even more will consume considerable >memory in some situations. > > No, it won't:
> /* Default alignment: as specified by the arch code. > * Except if an object is really small, then squeeze multiple > * into one cacheline. > */ > align = cache_line_size(); > while (size <= align/2) > align /= 2;
SLAB_HWCACHE_ALIGN is still just a hint, for small objects it's converted to alignment to a power of two boundary.
-- Manfred
- 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/
| |