[PATCH 3/3] sched/rt: Remove redundant check before push_rt_task()

From: Hiroshi Shimamoto
Date: Fri May 25 2012 - 02:51:24 EST


From: Hiroshi Shimamoto <h-shimamoto@xxxxxxxxxxxxx>

Currently rq->rt.overloaded is checked twice in switched_to_rt().
Remove the first one which out of push_rt_task().

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@xxxxxxxxxxxxx>
---
kernel/sched/rt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index c5565c3..a601a70 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1907,7 +1907,7 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)
*/
if (p->on_rq && rq->curr != p) {
#ifdef CONFIG_SMP
- if (rq->rt.overloaded && push_rt_task(rq) &&
+ if (push_rt_task(rq) &&
/* Don't resched if we changed runqueues */
rq != task_rq(p))
check_resched = 0;
--
1.7.7.6

--
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/