linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@in.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: How reliable is SLAB_HWCACHE_ALIGN?
Date: Wed, 10 Sep 2003 13:46:57 +0530	[thread overview]
Message-ID: <20030910081654.GA1129@llm08.in.ibm.com> (raw)

I was assuming that if you create a slab cache with SLAB_HWCACHE_ALIGN,
objects are guaranteed to be aligned to L1 cacheline.  But this piece
of code in kmem_cache_create has raised doubts.

----------------------------------------------------------------------------
        if (flags & SLAB_HWCACHE_ALIGN) {
                /* Need to adjust size so that objs are cache aligned. */
                /* Small obj size, can get at least two per cache line. */
                while (size < align/2)
                        align /= 2;
                size = (size+align-1)&(~(align-1));
        }
----------------------------------------------------------------------------

Am I missing something or can there really be two objects on the same 
cacheline even when SLAB_HWCACHE_ALIGN is specified?

Thanks,
Kiran

             reply	other threads:[~2003-09-10  8:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-10  8:16 Ravikiran G Thirumalai [this message]
2003-09-10 15:41 ` How reliable is SLAB_HWCACHE_ALIGN? Robert Love
2003-09-11  5:54   ` Ravikiran G Thirumalai
2003-09-11 11:08     ` [patch] Make slab allocator work with SLAB_MUST_HWCACHE_ALIGN Ravikiran G Thirumalai
2003-09-11 16:19       ` Manfred Spraul
2003-09-11 21:49         ` Manfred Spraul
2003-09-12  8:59         ` Ravikiran G Thirumalai
2003-09-12  9:10           ` Arjan van de Ven
2003-09-13 20:06           ` Manfred Spraul
2003-09-13 20:58             ` Dipankar Sarma
2003-09-14  8:09             ` Ravikiran G Thirumalai
2003-09-14 13:00               ` Dipankar Sarma
2003-09-15  5:13                 ` Ravikiran G Thirumalai

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=20030910081654.GA1129@llm08.in.ibm.com \
    --to=kiran@in.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).