as noted by Nicolas Pitre, atomic_[inc/dec]_call_if_[nonpositive/negative]()
atomic methods are slow on ARM, because they can only be implemented via
disabling interrupts. So tell the mutex code that we prefer atomic_xchg().
[ we still pull in asm-generic/atomic-call-if.h, so that they remain
generally available primitives - even though unused on ARM at the
moment. ]
Signed-off-by: Ingo Molnar <[email protected]>
----
arch/arm/Kconfig | 4 ++++
include/asm-arm/atomic.h | 7 +------
2 files changed, 5 insertions(+), 6 deletions(-)
Index: linux/arch/arm/Kconfig
===================================================================
--- linux.orig/arch/arm/Kconfig
+++ linux/arch/arm/Kconfig
@@ -50,6 +50,10 @@ config UID16
bool
default y
+config MUTEX_XCHG_ALGORITHM
+ bool
+ default y
+
config RWSEM_GENERIC_SPINLOCK
bool
default y
Index: linux/include/asm-arm/atomic.h
===================================================================
--- linux.orig/include/asm-arm/atomic.h
+++ linux/include/asm-arm/atomic.h
@@ -179,12 +179,7 @@ static inline void atomic_clear_mask(uns
/*
* Pull in the generic wrappers for atomic_dec_call_if_negative() and
- * atomic_inc_call_if_nonpositive().
- *
- * TODO: implement optimized primitives instead, or leave the generic
- * implementation in place, or enable CONFIG_MUTEX_XCHG_ALGORITHM
- * to tell the generic mutex code to use the atomic_xchg() based
- * fastpath implementation.
+ * atomic_inc_call_if_nonpositive():
*/
#include <asm-generic/atomic-call-if.h>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]