linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] locking/qrwlock: Improve qrwlock performance
@ 2015-07-06 15:43 Waiman Long
  2015-07-06 15:43 ` [PATCH 1/4] locking/qrwlock: Better optimization for interrupt context readers Waiman Long
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Waiman Long @ 2015-07-06 15:43 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnd Bergmann, Thomas Gleixner
  Cc: linux-arch, linux-kernel, Will Deacon, Scott J Norton,
	Douglas Hatch, Waiman Long

In converting some existing spinlocks to rwlock, it was found that the
write lock slowpath performance isn't as good as the qspinlock. With
a workload that added a large number of inodes to the superblock and
was rate-limited by the inode_sb_list_lock, converting that spinlock
into a write lock slowed down its performance from about 22s to 36s.

This patch series tries to squeeze out as much performance as possible
to close the performance gap between qspinlock and qrwlock. With
all that patches applies, the workload performance improves to about
24-25s which is much better than before, though still a bit slower
than the spinlock.

With this patch series in place, we can start converting some spinlocks
back to rwlocks where it makes sense and the lock size increase isn't
a concern.

Waiman Long (4):
  locking/qrwlock: Better optimization for interrupt context readers
  locking/qrwlock: Reduce reader/writer to reader lock transfer latency
  locking/qrwlock: Reduce writer to writer lock transfer latency
  locking/qrwlock: Use direct MCS lock/unlock in slowpath

 arch/x86/include/asm/qrwlock.h      |    4 +
 include/asm-generic/qrwlock.h       |    4 +-
 include/asm-generic/qrwlock_types.h |   26 ++++-
 kernel/locking/qrwlock.c            |  185 ++++++++++++++++++++++++++--------
 kernel/locking/qspinlock.c          |    9 +-
 5 files changed, 174 insertions(+), 54 deletions(-)


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-07-08 17:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-06 15:43 [PATCH 0/4] locking/qrwlock: Improve qrwlock performance Waiman Long
2015-07-06 15:43 ` [PATCH 1/4] locking/qrwlock: Better optimization for interrupt context readers Waiman Long
2015-07-06 15:43 ` [PATCH 2/4] locking/qrwlock: Reduce reader/writer to reader lock transfer latency Waiman Long
2015-07-06 18:23   ` Will Deacon
2015-07-06 19:49     ` Waiman Long
2015-07-07  9:17       ` Will Deacon
2015-07-07 11:17         ` Peter Zijlstra
2015-07-07 11:49           ` Will Deacon
2015-07-07 14:30             ` Waiman Long
2015-07-07 17:27               ` Will Deacon
2015-07-07 18:10                 ` Will Deacon
2015-07-07 21:29                   ` Waiman Long
2015-07-08  9:52                     ` Peter Zijlstra
2015-07-08 17:19                       ` Will Deacon
2015-07-06 15:43 ` [PATCH 3/4] locking/qrwlock: Reduce writer to writer " Waiman Long
2015-07-06 15:43 ` [PATCH 4/4] locking/qrwlock: Use direct MCS lock/unlock in slowpath Waiman Long
2015-07-07 11:24   ` Peter Zijlstra
2015-07-07 21:59     ` Waiman Long
2015-07-07 22:13       ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).