Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314832

Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list is not NULL.

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list is not NULL.
Date 2016-01-22 10:00 +0100
Message-ID <qTFJv-1Dd-5@gated-at.bofh.it> (permalink)
References <qTjSG-3ll-15@gated-at.bofh.it> <qTwwA-3Hx-59@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jan 21, 2016 at 06:02:34PM -0500, Waiman Long wrote:
> This patch attempts to fix this live-lock condition by enabling the
> a woken task in the wait list to enter optimistic spinning loop itself
> with precedence over the ones in the OSQ. This should prevent the
> live-lock
> condition from happening.


So I think having the top waiter going back in to contend on the OSQ is
an excellent idea, but I'm not sure the wlh_spinning thing is important.

The OSQ itself is FIFO fair, and the waiters retain the wait_list
position. So having the top wait_list entry contending on the OSQ
ensures we cannot starve (I think).

Also, as Davidlohr said, we cannot copy/paste this much code.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RFC] locking/mutexes: don't spin on owner when wait list is  not NULL. Ding Tianhong <dingtianhong@huawei.com> - 2016-01-21 10:40 +0100
  Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Tim Chen <tim.c.chen@linux.intel.com> - 2016-01-21 22:30 +0100
    Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Davidlohr Bueso <dave@stgolabs.net> - 2016-01-22 03:50 +0100
      Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-22 04:20 +0100
    Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-01-22 03:50 +0100
  Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Waiman Long <waiman.long@hpe.com> - 2016-01-22 00:10 +0100
    Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Davidlohr Bueso <dave@stgolabs.net> - 2016-01-22 07:20 +0100
      Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Waiman Long <waiman.long@hpe.com> - 2016-01-22 14:40 +0100
        Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Davidlohr Bueso <dave@stgolabs.net> - 2016-01-22 17:50 +0100
          [PATCH] locking/mutex: Allow next waiter lockless wakeup Davidlohr Bueso <dave@stgolabs.net> - 2016-01-25 03:30 +0100
            Re: [PATCH] locking/mutex: Allow next waiter lockless wakeup Waiman Long <waiman.long@hpe.com> - 2016-01-26 00:10 +0100
    Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Peter Zijlstra <peterz@infradead.org> - 2016-01-22 10:00 +0100
      Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Jason Low <jason.low2@hp.com> - 2016-01-22 11:30 +0100
        Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Peter Zijlstra <peterz@infradead.org> - 2016-01-22 12:00 +0100
          Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Peter Zijlstra <peterz@infradead.org> - 2016-01-22 12:00 +0100
            Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Peter Zijlstra <peterz@infradead.org> - 2016-01-22 12:10 +0100
              Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Waiman Long <waiman.long@hpe.com> - 2016-01-22 15:10 +0100
                Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Ding Tianhong <dingtianhong@huawei.com> - 2016-01-24 09:10 +0100
      Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list  is not NULL. Waiman Long <waiman.long@hpe.com> - 2016-01-22 14:50 +0100

csiph-web