All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, dcn@sgi.com
Subject: Re: [RFC, PATCH] set SLAB_HWCACHE_ALIGN for kmalloc caches
Date: Sat, 29 May 2004 08:57:27 +0200	[thread overview]
Message-ID: <40B83457.3060001@colorfullife.com> (raw)
In-Reply-To: <20040528162545.13fa2be8.akpm@osdl.org>

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


      reply	other threads:[~2004-05-29  6:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-28 20:47 [RFC, PATCH] set SLAB_HWCACHE_ALIGN for kmalloc caches Manfred Spraul
2004-05-28 23:25 ` Andrew Morton
2004-05-29  6:57   ` Manfred Spraul [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40B83457.3060001@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@osdl.org \
    --cc=dcn@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.