| Date | Sat, 15 Oct 2022 17:08:14 +0200 | From | Peter Zijlstra <> | Subject | Re: [RFC PATCH 07/11] sched: Add proxy execution |
| |
On Mon, Oct 03, 2022 at 09:44:57PM +0000, Connor O'Brien wrote: > @@ -965,7 +1026,10 @@ static noinline void __sched __mutex_unlock_slowpath(struct mutex *lock, unsigne > if (owner & MUTEX_FLAG_HANDOFF) > __mutex_handoff(lock, next); > > - preempt_disable(); > + preempt_disable(); /* XXX connoro: why disable preemption here? */ > +#ifdef CONFIG_PROXY_EXEC > + raw_spin_unlock(¤t->blocked_lock); > +#endif > raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
Because if we wouldn't have preemption disabled it would preempt here, before the wakeup:
> wake_up_q(&wake_q);
And you'd be stuck with a priority inversion.
|