From 56f924533023e39edfda09cf1a9c47b4abfe57c7 Mon Sep 17 00:00:00 2001 From: behlendo Date: Thu, 15 May 2008 17:32:41 +0000 Subject: Disable adaptive mutexs by default (always sleep), and while I'm at it add a module option for easy tuning. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@109 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-mutex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/spl') diff --git a/modules/spl/spl-mutex.c b/modules/spl/spl-mutex.c index 8ca1286e9..7fce77e8e 100644 --- a/modules/spl/spl-mutex.c +++ b/modules/spl/spl-mutex.c @@ -25,7 +25,7 @@ * -1: Spin until aquired or holder yeilds without dropping lock * 1-MAX_INT: Spin for N attempts before sleeping for lock */ -int mutex_spin_max = 100; +int mutex_spin_max = 0; #ifdef DEBUG_MUTEX int mutex_stats[MUTEX_STATS_SIZE] = { 0 }; @@ -272,3 +272,5 @@ spl_mutex_fini(void) EXIT; } +module_param(mutex_spin_max, int, 0644); +MODULE_PARM_DESC(mutex_spin_max, "Spin a maximum of N times to aquire lock"); -- cgit v1.2.3