Re: [PATCH 5/6] sched/dl: reschedule if successfully pull earlier deadline task

From: Peter Zijlstra
Date: Fri Oct 31 2014 - 11:37:38 EST


On Thu, Oct 30, 2014 at 10:21:00AM +0000, Juri Lelli wrote:
> Peter, is the task_on_rq_queued() check for cases in which p is not
> enqueued but its class changes after a setscheduler/rt_mutex_setprio?

Yes, in particular if the task wasn't on the rq we won't change the rq
by changing the class and therefore we don't need to attempt to pull.

---
commit da7a735e51f9622eb3e1672594d4a41da01d7e4f
Author: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Date: Mon Jan 17 17:03:27 2011 +0100

sched: Fix switch_from_fair()

When a task is taken out of the fair class we must ensure the vruntime
is properly normalized because when we put it back in it will assume
to be normalized.

The case that goes wrong is when changing away from the fair class
while sleeping. Sleeping tasks have non-normalized vruntime in order
to make sleeper-fairness work. So treat the switch away from fair as a
wakeup and preserve the relative vruntime.

Also update sysrq-n to call the ->switch_{to,from} methods.

Reported-by: Onkalo Samu <samu.p.onkalo@xxxxxxxxx>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/