sched: Cleanup pre_schedule_rt
authorYong Zhang <yong.zhang0@gmail.com>
Tue, 9 Feb 2010 19:43:59 +0000 (14:43 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 13 Dec 2010 20:02:46 +0000 (15:02 -0500)
Since [commit 9a897c5a:
sched: RT-balance, replace hooks with pre/post schedule and wakeup methods]
we must call pre_schedule_rt if prev is rt task.
So condition rt_task(prev) is always true and the 'unlikely' declaration is
simply incorrect.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/sched_rt.c

index bea7d79..1ab66a2 100644 (file)
@@ -1474,7 +1474,7 @@ skip:
 static void pre_schedule_rt(struct rq *rq, struct task_struct *prev)
 {
        /* Try to pull RT tasks here if we lower this rq's prio */
-       if (unlikely(rt_task(prev)) && rq->rt.highest_prio.curr > prev->prio)
+       if (rq->rt.highest_prio.curr > prev->prio)
                pull_rt_task(rq);
 }