Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2009 02:09:10 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r192712 - user/kmacy/releng_7_2_fcs/sys/kern
Message-ID:  <200905250209.n4P29AN9007468@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905250209.n4P29AN9007468>