Re: [PATCH -v5 07/14] futex: Change locking rules

2017-03-07 Thread Peter Zijlstra
On Tue, Mar 07, 2017 at 05:47:44PM +0100, Sebastian Andrzej Siewior wrote: > On 2017-03-07 14:22:14 [+0100], Thomas Gleixner wrote: > > Both 'return' statements leak &pi_state->pi_mutex.wait_lock > > this has unlock in both 'return's. > handle_fault: > + raw_spin_unlock_irq(&pi_state->p

Re: [PATCH -v5 07/14] futex: Change locking rules

2017-03-07 Thread Sebastian Andrzej Siewior
From: Peter Zijlstra Date: Sat, 4 Mar 2017 10:27:24 +0100 Subject: [PATCH] futex: Change locking rules Currently futex-pi relies on hb->lock to serialize everything. Since hb->lock is giving us problems (PI inversions among other things, since on -rt hb lock itself is a rt_mutex), we want to brea

Re: [PATCH -v5 07/14] futex: Change locking rules

2017-03-07 Thread Thomas Gleixner
On Sat, 4 Mar 2017, Peter Zijlstra wrote: > @@ -2166,36 +2252,43 @@ static int fixup_pi_state_owner(u32 __us > /* > - * To handle the page fault we need to drop the hash bucket > - * lock here. That gives the other task (either the highest priority > - * waiter itself or the ta

[PATCH -v5 07/14] futex: Change locking rules

2017-03-04 Thread Peter Zijlstra
Currently futex-pi relies on hb->lock to serialize everything. Since hb->lock is giving us problems (PI inversions among other things, since on -rt hb lock itself is a rt_mutex), we want to break this up a bit. This patch reworks and documents the locking. Notably, it consistently uses rt_mutex::w