Re: [PATCH] locking/mutex: Clear mutex-handoff flag on interrupt

2017-01-12 Thread Chris Wilson
On Wed, Jan 11, 2017 at 04:57:32PM +, Chris Wilson wrote: > On Wed, Jan 11, 2017 at 05:43:02PM +0100, Peter Zijlstra wrote: > > FWIW, I have the below patch that should also solve this problem afaict. > > Thanks, I shall see if makes my machines happy. I have had a few machines run for over 2

Re: [PATCH] locking/mutex: Clear mutex-handoff flag on interrupt

2017-01-11 Thread Chris Wilson
On Wed, Jan 11, 2017 at 05:43:02PM +0100, Peter Zijlstra wrote: > On Mon, Jan 09, 2017 at 11:52:03AM +, Chris Wilson wrote: > > If we abort the mutex_lock() due to an interrupt, or other error from > > s/interrupt/signal/, right? Yes. EINTR is ingrained. > > ww_mutex, we need to relinquish

Re: [PATCH] locking/mutex: Clear mutex-handoff flag on interrupt

2017-01-11 Thread Peter Zijlstra
On Mon, Jan 09, 2017 at 11:52:03AM +, Chris Wilson wrote: > If we abort the mutex_lock() due to an interrupt, or other error from s/interrupt/signal/, right? > ww_mutex, we need to relinquish the handoff flag if we applied it. > Otherwise, we may cause missed wakeups as the current owner may

[PATCH] locking/mutex: Clear mutex-handoff flag on interrupt

2017-01-09 Thread Chris Wilson
If we abort the mutex_lock() due to an interrupt, or other error from ww_mutex, we need to relinquish the handoff flag if we applied it. Otherwise, we may cause missed wakeups as the current owner may try to handoff to a new thread that is not expecting the handoff and so sleep thinking the lock is