Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423272

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

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 3/8] sched/deadline/rtmutex: Dont miss the dl_runtime/dl_period update
Date 2016-06-15 20:00 +0200
Message-ID <rKngC-5DP-17@gated-at.bofh.it> (permalink)
References <rHvDI-7fg-35@gated-at.bofh.it> <rHvNn-7ix-3@gated-at.bofh.it> <rKm1c-4VP-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jun 15, 2016 at 12:30:07PM -0400, Steven Rostedt wrote:

> > +++ 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)) {
> 
> Isn't task the owner of the lock? 

No, task is blocked on something.

> What happens if the waiter is a
> deadline task?

So the test here is a shortcut to terminate the Pi chain adjust, it says
that if the waiter and task have the same priority, we're done. Further
adjustments will not make a difference.

The problem is that for deadline tasks, prio is a useless number, so
even if they match (all deadline tasks have prio -1) they might still
not actually match.

After the last patch I suppose we could do something like:

	waiter->prio == task->prio && waiter->deadline == task->dl.deadline

In any case, any condition that compares just two 'prio' values is per
definition broken if DL tasks are involved.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC][PATCH 3/8] sched/deadline/rtmutex: Dont miss the  dl_runtime/dl_period update Steven Rostedt <rostedt@goodmis.org> - 2016-06-15 18:40 +0200
  Re: [RFC][PATCH 3/8] sched/deadline/rtmutex: Dont miss the  dl_runtime/dl_period update Peter Zijlstra <peterz@infradead.org> - 2016-06-15 20:00 +0200

csiph-web