svn commit: r192712 - user/kmacy/releng_7_2_fcs/sys/kern

Kip Macy kmacy at FreeBSD.org
Mon May 25 02:09:10 UTC 2009


Author: kmacy
Date: Mon May 25 02:09:09 2009
New Revision: 192712
URL: http://svn.freebsd.org/changeset/base/192712

Log:
  remove SX_SPINS limit

Modified:
  user/kmacy/releng_7_2_fcs/sys/kern/kern_sx.c

Modified: user/kmacy/releng_7_2_fcs/sys/kern/kern_sx.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/kern/kern_sx.c	Mon May 25 02:05:00 2009	(r192711)
+++ user/kmacy/releng_7_2_fcs/sys/kern/kern_sx.c	Mon May 25 02:09:09 2009	(r192712)
@@ -57,10 +57,6 @@ __FBSDID("$FreeBSD$");
 
 #ifdef ADAPTIVE_SX
 #include <machine/cpu.h>
-
-#ifndef SX_SPINS
-#define	SX_SPINS 1000
-#endif
 #endif
 
 #ifdef DDB
@@ -481,12 +477,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t 
 				GIANT_SAVE();
 				spin_count = 0;
 				while (SX_OWNER(sx->sx_lock) == x &&
-				    TD_IS_RUNNING(owner) &&
-				    (spin_count++ < SX_SPINS))
+				    TD_IS_RUNNING(owner))
 					cpu_spinwait();
-
-				if (spin_count < SX_SPINS)
-					continue;
 			}
 		}
 #endif
@@ -718,11 +710,8 @@ _sx_slock_hard(struct sx *sx, int opts, 
 				GIANT_SAVE();
 				spin_count = 0;
 				while (SX_OWNER(sx->sx_lock) == x &&
-				    TD_IS_RUNNING(owner) &&
-				    (spin_count++ < SX_SPINS))
+				    TD_IS_RUNNING(owner))
 					cpu_spinwait();
-				if (spin_count < SX_SPINS)
-					continue;
 			}
 		}
 #endif


More information about the svn-src-user mailing list