All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] locking/mutex: Enable optimistic spinning of lock waiter
@ 2016-02-09 19:47 Waiman Long
  2016-02-09 19:47 ` [PATCH 1/2] locking/mutex: Add waiter parameter to mutex_optimistic_spin() Waiman Long
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Waiman Long @ 2016-02-09 19:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, linux-kernel, Linus Torvalds, Ding Tianhong,
	Jason Low, Davidlohr Bueso, Paul E. McKenney, Thomas Gleixner,
	Will Deacon, Tim Chen, Waiman Long

This patchset is a variant of PeterZ's "locking/mutex: Avoid spinner
vs waiter starvation" patch. The major difference is that the
waiter-spinner won't enter into the OSQ used by the spinners. Instead,
it will spin directly on the lock in parallel with the queue head
of the OSQ. So there will be a bit more cacheline contention on the
lock cacheline, but that shouldn't cause noticeable impact on system
performance.

This patchset tries to address 2 issues with Peter's patch:

 1) Ding Tianhong still find that hanging task could happen in some cases.
 2) Jason Low found that there was performance regression for some AIM7
    workloads.

By making the waiter-spinner to spin directly on the mutex, it will
increase the chance for the waiter-spinner to get the lock instead
of waiting in the OSQ for its turn.

My own test on a 4-socket E7-4820 v3 system showed a regression of
about 4% in the high_systime workload with Peter's patch which this
new patch effectively eliminates.

Waiman Long (2):
  locking/mutex: Add waiter parameter to mutex_optimistic_spin()
  locking/mutex: Enable optimistic spinning of woken task in wait queue

 kernel/locking/mutex.c |   68 ++++++++++++++++++++++++++++++++++-------------
 1 files changed, 49 insertions(+), 19 deletions(-)

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

end of thread, other threads:[~2016-02-12 17:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09 19:47 [PATCH 0/2] locking/mutex: Enable optimistic spinning of lock waiter Waiman Long
2016-02-09 19:47 ` [PATCH 1/2] locking/mutex: Add waiter parameter to mutex_optimistic_spin() Waiman Long
2016-02-09 19:47 ` [PATCH 2/2] locking/mutex: Enable optimistic spinning of woken task in wait queue Waiman Long
2016-02-09 21:44 ` [PATCH 0/2] locking/mutex: Enable optimistic spinning of lock waiter Jason Low
2016-02-12 17:22   ` Waiman Long

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.