diff options
author | Heiko Carstens | 2013-09-05 13:26:17 +0200 |
---|---|---|
committer | Heiko Carstens | 2013-09-28 12:46:29 +0200 |
commit | efc1d23b3d9af8cbff9f26677d67fb9c1b9cb792 (patch) | |
tree | 3d8aeeff16451c5bd61ead4e68bb418e71a3d3bb /arch/s390/include | |
parent | lockref: use arch_mutex_cpu_relax() in CMPXCHG_LOOP() (diff) | |
download | kernel-qcow2-linux-efc1d23b3d9af8cbff9f26677d67fb9c1b9cb792.tar.gz kernel-qcow2-linux-efc1d23b3d9af8cbff9f26677d67fb9c1b9cb792.tar.xz kernel-qcow2-linux-efc1d23b3d9af8cbff9f26677d67fb9c1b9cb792.zip |
s390: enable ARCH_USE_CMPXCHG_LOCKREF
Enable ARCH_USE_CMPXCHG_LOCKREF since it shows performance improvements
with Linus' simple stat() test case of up to 50% on a 30 cpu system.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/spinlock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h index 701fe8c59e1f..83e5d216105e 100644 --- a/arch/s390/include/asm/spinlock.h +++ b/arch/s390/include/asm/spinlock.h @@ -44,6 +44,11 @@ extern void arch_spin_lock_wait_flags(arch_spinlock_t *, unsigned long flags); extern int arch_spin_trylock_retry(arch_spinlock_t *); extern void arch_spin_relax(arch_spinlock_t *lock); +static inline int arch_spin_value_unlocked(arch_spinlock_t lock) +{ + return lock.owner_cpu == 0; +} + static inline void arch_spin_lock(arch_spinlock_t *lp) { int old; |