lkml.org 
[lkml]   [2004]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

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