[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57AA178D.2050604@hpe.com>
Date: Tue, 9 Aug 2016 13:49:01 -0400
From: Waiman Long <waiman.long@....com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Ingo Molnar <mingo@...hat.com>, <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ding Tianhong <dingtianhong@...wei.com>,
Jason Low <jason.low2@....com>,
Davidlohr Bueso <dave@...olabs.net>,
"Paul E. McKenney" <paulmck@...ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <Will.Deacon@....com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Imre Deak <imre.deak@...el.com>
Subject: Re: [PATCH v4 2/3] locking/mutex: Enable optimistic spinning of woken
task in wait queue
On 08/08/2016 01:29 PM, Peter Zijlstra wrote:
> On Mon, Jul 18, 2016 at 04:39:25PM -0400, Waiman Long wrote:
>> Ding Tianhong reported a live-lock situation where a constant stream
>> of incoming optimistic spinners blocked a task in the wait list from
>> getting the mutex.
>>
>> This patch attempts to fix this live-lock condition by enabling the
>> woken task in the wait queue to enter into an optimistic spinning
>> loop itself in parallel with the regular spinners in the OSQ. This
>> should prevent the live-lock condition from happening.
> No, two spinners are not in fact starvation proof. It makes the reported
> life-lock scenario much less likely, but it does not guarantee anything.
Yes, I should have said reducing the chance of live-locking.
>> + /*
>> + * Optimistically spinning on the mutex without the wait lock
> There should either be a '.' at the end of that line, or the next line
> should not start with a capital.
>
> Also, I don't see how the two sentences are related, should they be in
> the same paragraph?
Sorry for the missing '.', and I will split it into 2 paragraphs.
Cheers,
Longman
Powered by blists - more mailing lists