summaryrefslogtreecommitdiffstats
path: root/module/spl/spl-mutex.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-09-29 16:48:35 -0400
committerBrian Behlendorf <[email protected]>2014-10-17 15:07:28 -0700
commita80d69caf0daa28d661c88cb699bee02de2e312d (patch)
tree0dd74a2c68cd28e82a7ed518e67cb71948b63726 /module/spl/spl-mutex.c
parent56cfabd3e8ceac79703edd4453c2c2d89a15ff6f (diff)
Remove adaptive mutex implementation
Since the Linux 2.6.29 kernel all mutexes have been adaptive mutexs. There is no longer any point in keeping this code so it is being removed to simplify the code. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/spl/spl-mutex.c')
-rw-r--r--module/spl/spl-mutex.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c
index f0e786da5..a29d488d1 100644
--- a/module/spl/spl-mutex.c
+++ b/module/spl/spl-mutex.c
@@ -32,46 +32,5 @@
#define DEBUG_SUBSYSTEM S_MUTEX
-/*
- * While a standard mutex implementation has been available in the kernel
- * for quite some time. It was not until 2.6.29 and latter kernels that
- * adaptive mutexs were embraced and integrated with the scheduler. This
- * brought a significant performance improvement, but just as importantly
- * it added a lock owner to the generic mutex outside CONFIG_DEBUG_MUTEXES
- * builds. This is critical for correctly supporting the mutex_owner()
- * Solaris primitive. When the owner is available we use a pure Linux
- * mutex implementation. When the owner is not available we still use
- * Linux mutexs as a base but also reserve space for an owner field right
- * after the mutex structure.
- *
- * In the case when HAVE_MUTEX_OWNER is not defined your code may
- * still me able to leverage adaptive mutexs. As long as the task_curr()
- * symbol is exported this code will provide a poor mans adaptive mutex
- * implementation. However, this is not required and if the symbol is
- * unavailable we provide a standard mutex.
- */
-
-#if !defined(HAVE_MUTEX_OWNER) || !defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
-#ifdef HAVE_TASK_CURR
-/*
- * mutex_spin_max = { 0, -1, 1-MAX_INT }
- * 0: Never spin when trying to acquire lock
- * -1: Spin until acquired or holder yields without dropping lock
- * 1-MAX_INT: Spin for N attempts before sleeping for lock
- */
-int mutex_spin_max = 0;
-module_param(mutex_spin_max, int, 0644);
-MODULE_PARM_DESC(mutex_spin_max, "Spin a maximum of N times to acquire lock");
-
-int
-spl_mutex_spin_max(void)
-{
- return mutex_spin_max;
-}
-EXPORT_SYMBOL(spl_mutex_spin_max);
-
-#endif /* HAVE_TASK_CURR */
-#endif /* !HAVE_MUTEX_OWNER */
-
int spl_mutex_init(void) { return 0; }
void spl_mutex_fini(void) { }