Skip to content

Commit

Permalink
s390: enable ARCH_USE_CMPXCHG_LOCKREF
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
heicarst committed Sep 28, 2013
1 parent 491f6f8 commit efc1d23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ config S390
select ARCH_INLINE_WRITE_UNLOCK_IRQ
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT
select CLONE_BACKWARDS2
Expand Down
5 changes: 5 additions & 0 deletions arch/s390/include/asm/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit efc1d23

Please sign in to comment.