Skip to content

Commit

Permalink
sched: only try to push a task on wakeup if it is migratable
Browse files Browse the repository at this point in the history
There is no sense in wasting time trying to push a task away that
cannot move anywhere else.  We gain no benefit from trying to push
other tasks at this point, so if the task being woken up is non
migratable, just skip the whole operation.  This reduces overhead
in the wakeup path for certain tasks.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
  • Loading branch information
Gregory Haskins committed Dec 29, 2008
1 parent 74ab8e4 commit 777c2f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,8 @@ static void task_wake_up_rt(struct rq *rq, struct task_struct *p)
{
if (!task_running(rq, p) &&
!test_tsk_need_resched(rq->curr) &&
rq->rt.overloaded)
rq->rt.overloaded &&
p->rt.nr_cpus_allowed > 1)
push_rt_tasks(rq);
}

Expand Down

0 comments on commit 777c2f3

Please sign in to comment.