login
Header Space

 
 

Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nick Piggin <npiggin@...>
Cc: <netdev@...>, Linux Kernel Mailing List <linux-kernel@...>, <yanmin_zhang@...>, David Miller <davem@...>, Christoph Lameter <clameter@...>
Date: Monday, March 3, 2008 - 9:00 am

Nick Piggin a écrit :
Well, if a kmem_cache_create() is used, this is probably because number 
of objects can be large, so kmalloc() power-of-two granularity could 
waste lot of ram.

But yes, you are right that SLAB_SMP_ALIGN doesnt imply SLAB_HWCACHE_ALIGN

- SMP_ALIGN is a hint about false sharing (when object contains a refcnt 
for example), that is a concern only if

num_possible_cpus() > 1

While HWCACHE_ALIGN might be a hint saying :
- The writer carefully designed the structure so that max performance is 
obtained when all objects starts on a cache line boundary, even on 
Uniprocessor.

But I suspect some uses of HWCACHE_ALIGN are not a hint but a strong 
requirement.

Maybe we need to use three flags to separate the meanings ?


SLAB_HINT_SMP_ALIGN
SLAB_HINT_HWCACHE_ALIGN
SLAB_HWCACHE_ALIGN /* strong requirement that two objects dont share a 
cache line */





--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Mon Mar 3, 3:08 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Mon Mar 3, 4:10 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Mon Mar 3, 5:16 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Wed Mar 5, 5:06 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 6:56 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 10:26 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 10:54 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 11:18 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 11:58 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Mon Mar 3, 5:32 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Wed Mar 5, 4:56 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 6:53 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 10:20 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 10:27 pm)
Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment, Christoph Lameter, (Thu Mar 6, 10:33 pm)
[rfc][patch 3/3] use SLAB_ALIGN_SMP, Nick Piggin, (Mon Mar 3, 5:36 am)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Eric Dumazet, (Mon Mar 3, 5:53 am)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Nick Piggin, (Mon Mar 3, 8:41 am)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Eric Dumazet, (Mon Mar 3, 9:00 am)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Nick Piggin, (Mon Mar 3, 9:46 am)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Pekka Enberg, (Mon Mar 3, 9:53 am)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Christoph Lameter, (Mon Mar 3, 3:09 pm)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Nick Piggin, (Mon Mar 3, 4:10 pm)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Christoph Lameter, (Mon Mar 3, 4:12 pm)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Nick Piggin, (Mon Mar 3, 4:18 pm)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Christoph Lameter, (Mon Mar 3, 5:14 pm)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Eric Dumazet, (Mon Mar 3, 10:15 am)
Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP, Christoph Lameter, (Mon Mar 3, 3:10 pm)
[rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Mon Mar 3, 5:35 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Mon Mar 3, 3:06 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Mon Mar 3, 4:03 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Mon Mar 3, 4:09 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Mon Mar 3, 4:12 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Mon Mar 3, 4:17 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Mon Mar 3, 4:24 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Mon Mar 3, 5:31 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Fri Mar 7, 12:37 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Fri Mar 7, 1:11 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Fri Mar 7, 1:19 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Fri Mar 7, 1:26 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Tue Mar 11, 3:13 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Wed Mar 12, 2:21 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Fri Mar 7, 1:37 am)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Nick Piggin, (Tue Mar 4, 8:16 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Pekka Enberg, (Mon Mar 3, 4:41 pm)
Re: [rfc][patch 2/3] slab: introduce SMP alignment, Christoph Lameter, (Mon Mar 3, 5:23 pm)
speck-geostationary