linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Cache align futex hash buckets
@ 2006-02-20 23:32 Ravikiran G Thirumalai
  2006-02-20 23:33 ` Andrew Morton
  2006-02-21  3:30 ` Nick Piggin
  0 siblings, 2 replies; 22+ messages in thread
From: Ravikiran G Thirumalai @ 2006-02-20 23:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Shai Fultheim (Shai@scalex86.org)

Following change places each element of the futex_queues hashtable on a 
different cacheline.  Spinlocks of adjacent hash buckets lie on the same 
cacheline otherwise.

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>

Index: linux-2.6.16-rc2/kernel/futex.c
===================================================================
--- linux-2.6.16-rc2.orig/kernel/futex.c	2006-02-07 23:14:04.000000000 -0800
+++ linux-2.6.16-rc2/kernel/futex.c	2006-02-09 14:04:22.000000000 -0800
@@ -100,9 +100,10 @@ struct futex_q {
 struct futex_hash_bucket {
        spinlock_t              lock;
        struct list_head       chain;
-};
+} ____cacheline_internodealigned_in_smp;
 
-static struct futex_hash_bucket futex_queues[1<<FUTEX_HASHBITS];
+static struct futex_hash_bucket futex_queues[1<<FUTEX_HASHBITS] 
+				__cacheline_aligned_in_smp;
 
 /* Futex-fs vfsmount entry: */
 static struct vfsmount *futex_mnt;

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2006-02-23  2:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-20 23:32 [patch] Cache align futex hash buckets Ravikiran G Thirumalai
2006-02-20 23:33 ` Andrew Morton
2006-02-20 23:34   ` Andrew Morton
2006-02-21  0:09     ` Ravikiran G Thirumalai
2006-02-21  0:23       ` Andrew Morton
2006-02-21  1:04         ` Ravikiran G Thirumalai
2006-02-21  1:09           ` Andrew Morton
2006-02-21  1:39             ` Ravikiran G Thirumalai
2006-02-21 14:44             ` Andi Kleen
2006-02-21  3:30 ` Nick Piggin
2006-02-21 18:33   ` Christoph Lameter
2006-02-21 23:14     ` Christoph Lameter
2006-02-22  0:40     ` Nick Piggin
2006-02-22  2:08       ` Andrew Morton
2006-02-22  2:35         ` Ravikiran G Thirumalai
2006-02-22  2:37         ` Nick Piggin
2006-02-22 20:17           ` Ravikiran G Thirumalai
2006-02-22 20:50             ` Andrew Morton
     [not found]               ` <20060223015144.GC3663@localhost.localdomain>
2006-02-23  2:08                 ` Ravikiran G Thirumalai
2006-02-21 20:20   ` Ravikiran G Thirumalai
2006-02-22  0:45     ` Nick Piggin
2006-02-22  2:09       ` Andrew Morton

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