[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160122085422.GO6357@twins.programming.kicks-ass.net>
Date: Fri, 22 Jan 2016 09:54:22 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Waiman Long <waiman.long@....com>
Cc: Ding Tianhong <dingtianhong@...wei.com>,
Ingo Molnar <mingo@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Davidlohr Bueso <dave@...olabs.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <Will.Deacon@....com>,
Jason Low <jason.low2@...com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Waiman Long <Waiman.Long@...com>
Subject: Re: [PATCH RFC] locking/mutexes: don't spin on owner when wait list
is not NULL.
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.
Powered by blists - more mailing lists