Skip to contentSkip to conversation

sched: cleanup pre_schedule_rt

PATCH New Yong Zhang 1 participant 1 message Feb 9, 2010

lore
Share & tools
lore

Yong Zhang

author
#0 lore raw

PATCH 1/1 sched: cleanup pre_schedule_rt

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 odd.

Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Rusty Russell <[email protected]>
---
 kernel/sched_rt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched_rt.c +1 -1
index f48328a..704b790 100644
@@ -1459,7 +1459,7 @@ static int pull_rt_task(struct rq *this_rq)
 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);
 }
 
Signature · 1 line
1.6.3.3