Re: [PATCH] kernel/futex: handle the case where we got a "late" waiter

2016-04-20 Thread Thomas Gleixner
On Tue, 19 Apr 2016, Davidlohr Bueso wrote: > On Fri, 15 Apr 2016, Sebastian Andrzej Siewior wrote: > > > futex_unlock_pi() gets uval before taking the hb lock. Now imagine > > someone in futex_lock_pi() took the lock. While futex_unlock_pi() waits > > for the hb lock, the LOCK_PI sets FUTEX_WAITE

Re: [PATCH] kernel/futex: handle the case where we got a "late" waiter

2016-04-20 Thread Sebastian Andrzej Siewior
On 04/20/2016 12:27 AM, Davidlohr Bueso wrote: > On Fri, 15 Apr 2016, Sebastian Andrzej Siewior wrote: > >> futex_unlock_pi() gets uval before taking the hb lock. Now imagine >> someone in futex_lock_pi() took the lock. While futex_unlock_pi() waits >> for the hb lock, the LOCK_PI sets FUTEX_WAITE

Re: [PATCH] kernel/futex: handle the case where we got a "late" waiter

2016-04-19 Thread Davidlohr Bueso
On Fri, 15 Apr 2016, Sebastian Andrzej Siewior wrote: futex_unlock_pi() gets uval before taking the hb lock. Now imagine someone in futex_lock_pi() took the lock. While futex_unlock_pi() waits for the hb lock, the LOCK_PI sets FUTEX_WAITERS and drops the lock. Now, futex_unlock_pi() figures out