Re: [RFC][PATCH 3/8] sched/deadline/rtmutex: Dont miss the dl_runtime/dl_period update

From: Peter Zijlstra
Date: Tue Jun 14 2016 - 08:09:22 EST


On Tue, Jun 14, 2016 at 11:43:39AM +0100, Juri Lelli wrote:
> > [peterz: I should introduce more task state comparators like
> > rt_mutex_waiter_less, all PI prio comparisons already have this DL
> > exception, except this one]

> > +++ b/kernel/locking/rtmutex.c
> > @@ -488,7 +488,7 @@ static int rt_mutex_adjust_prio_chain(st
> > * enabled we continue, but stop the requeueing in the chain
> > * walk.
> > */
> > - if (waiter->prio == task->prio) {
> > + if (waiter->prio == task->prio && !dl_task(task)) {
>
> Right. Do we want a rt_mutex_waiter_equal() helper? As I think the
> comment in the changelog was also saying?

rt_mutex_waiter_equal() isn't going to help; it will not work on code
that doesn't have access to rt_mutex_waiter thingies, like
rt_mutex_setprio() for example.

Then again, I already wondered about making rt_mutex_waiter available to
sched code, but tglx didn't much like that iirc.

Esp. given the last patch in this series, I wondered if perhaps the
second argument to rt_mutex_setprio() should be a struct
rt_mutex_waiter, instead of struct task_struct.