Re: [PATCH -v2 1/9] rtmutex: Deboost before waking up the top waiter
From: Peter Zijlstra
Date: Thu Sep 29 2016 - 10:50:12 EST
On Thu, Sep 29, 2016 at 10:43:54AM -0400, Thomas Gleixner wrote:
> On Mon, 26 Sep 2016, Peter Zijlstra wrote:
>
> > On Mon, Sep 26, 2016 at 11:37:27AM -0400, Steven Rostedt wrote:
> > > On Mon, 26 Sep 2016 11:35:03 -0400
> > > Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > >
> > > > Especially now that the code after the spin_unlock(&hb->lock) is now a
> > > > critical section (preemption is disable). There's nothing obvious in
> > > > futex.c that says it is.
> > >
> > > Not to mention, this looks like it will break PREEMPT_RT as wake_up_q()
> > > calls sleepable spin locks.
> >
> > What locks would that be?
>
> None :)
>
> It still breaks RT in the futex case due to:
>
> deboost = rt_mutex_futex_unlock();
>
> spin_unlock(&hb->lock);
> ....
Yeah, noticed that already. Am currently trying to untangle the pi_state
locking rules.