提交 17b3279b 编写于 作者: G Gregory Haskins 提交者: Ingo Molnar

sched: break out early if RT task cannot be migrated

We don't need to bother searching if the task cannot be migrated
Signed-off-by: NGregory Haskins <ghaskins@novell.com>
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 e1f47d89
......@@ -176,7 +176,8 @@ static int select_task_rq_rt(struct task_struct *p, int sync)
* that is just being woken and probably will have
* cold cache anyway.
*/
if (unlikely(rt_task(rq->curr))) {
if (unlikely(rt_task(rq->curr)) &&
(p->nr_cpus_allowed > 1)) {
int cpu = find_lowest_rq(p);
return (cpu == -1) ? task_cpu(p) : cpu;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册