Re: [IA64] Reduce __clear_bit_unlock overhead

From: Christoph Lameter <clameter_at_sgi.com>
Date: 2007-10-19 21:12:44
On Fri, 19 Oct 2007, Nick Piggin wrote:

> Of course, we can avoid the fence altogether on x86 as well, because
> it simply isn't needed for release semantics.

So we can generally switch to using wmb there?



__clear_bit_unlock: A write barrier is sufficient for release semantics

Switch the smb_mb that causes a fence instruction to be issued on x86
to a write barrier which issues no instruction on x86.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6/include/asm-generic/bitops/lock.h
===================================================================
--- linux-2.6.orig/include/asm-generic/bitops/lock.h	2007-10-19 04:08:58.000000000 -0700
+++ linux-2.6/include/asm-generic/bitops/lock.h	2007-10-19 04:09:17.000000000 -0700
@@ -37,7 +37,7 @@ do {					\
  */
 #define __clear_bit_unlock(nr, addr)	\
 do {					\
-	smp_mb();			\
+	smp_wmb();			\
 	__clear_bit(nr, addr);		\
 } while (0)
 
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Oct 19 21:12:57 2007

This archive was generated by hypermail 2.1.8 : 2007-10-19 21:13:12 EST