[PATCH] don't use ld.bias

From: Jesse Barnes <jbarnes_at_sgi.com>
Date: 2003-07-22 09:55:59
Patch to fix spin_lock to not use ld.bias since it causes a bunch of bus
activity that hurts scalability when a lock is contended.

Thanks,
Jesse

===== include/asm-ia64/spinlock.h 1.13 vs edited =====
--- 1.13/include/asm-ia64/spinlock.h	Fri May 30 19:59:40 2003
+++ edited/include/asm-ia64/spinlock.h	Mon Jul 21 16:54:15 2003
@@ -93,13 +93,16 @@
  * Streamlined test_and_set_bit(0, (x)).  We use test-and-test-and-set
  * rather than a simple xchg to avoid writing the cache-line when
  * there is contention.
+ *
+ * Don't use ld.bias since it generates unnecessary bus activity on
+ * multiprocessor systems when the lock is contended.
  */
 #define _raw_spin_lock(x) __asm__ __volatile__ (		\
 	"mov ar.ccv = r0\n"					\
 	"mov r29 = 1\n"						\
 	";;\n"							\
 	"1:\n"							\
-	"ld4.bias r2 = [%0]\n"					\
+	"ld4 r2 = [%0]\n"					\
 	";;\n"							\
 	"cmp4.eq p0,p7 = r0,r2\n"				\
 	"(p7) br.cond.spnt.few 1b \n"				\
-
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 Mon Jul 21 19:56:38 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:16 EST