linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How reliable is SLAB_HWCACHE_ALIGN?
@ 2003-09-10  8:16 Ravikiran G Thirumalai
  2003-09-10 15:41 ` Robert Love
  0 siblings, 1 reply; 14+ messages in thread
From: Ravikiran G Thirumalai @ 2003-09-10  8:16 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <u8mV.so.19@gated-at.bofh.it>]

end of thread, other threads:[~2003-09-15  5:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-10  8:16 How reliable is SLAB_HWCACHE_ALIGN? Ravikiran G Thirumalai
2003-09-10 15:41 ` 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
     [not found] <u8mV.so.19@gated-at.bofh.it>
     [not found] ` <ufor.30e.21@gated-at.bofh.it>
     [not found]   ` <usvj.6s9.17@gated-at.bofh.it>
     [not found]     ` <uxv1.5D5.23@gated-at.bofh.it>
     [not found]       ` <uCuI.5hY.13@gated-at.bofh.it>
     [not found]         ` <uRWI.xK.5@gated-at.bofh.it>
     [not found]           ` <voSF.8l7.17@gated-at.bofh.it>
2003-09-13 22:18             ` Arnd Bergmann

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).