Commit efc1d23b3d9af8cbff9f26677d67fb9c1b9cb792
1 parent
491f6f8e5f
Exists in
master
and in
20 other branches
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>
Showing 2 changed files with 6 additions and 0 deletions Side-by-side Diff
arch/s390/Kconfig
... | ... | @@ -93,6 +93,7 @@ |
93 | 93 | select ARCH_INLINE_WRITE_UNLOCK_IRQ |
94 | 94 | select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE |
95 | 95 | select ARCH_SAVE_PAGE_KEYS if HIBERNATION |
96 | + select ARCH_USE_CMPXCHG_LOCKREF | |
96 | 97 | select ARCH_WANT_IPC_PARSE_VERSION |
97 | 98 | select BUILDTIME_EXTABLE_SORT |
98 | 99 | select CLONE_BACKWARDS2 |
arch/s390/include/asm/spinlock.h
... | ... | @@ -44,6 +44,11 @@ |
44 | 44 | extern int arch_spin_trylock_retry(arch_spinlock_t *); |
45 | 45 | extern void arch_spin_relax(arch_spinlock_t *lock); |
46 | 46 | |
47 | +static inline int arch_spin_value_unlocked(arch_spinlock_t lock) | |
48 | +{ | |
49 | + return lock.owner_cpu == 0; | |
50 | +} | |
51 | + | |
47 | 52 | static inline void arch_spin_lock(arch_spinlock_t *lp) |
48 | 53 | { |
49 | 54 | int old; |