]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sched: break out early if RT task cannot be migrated
authorGregory Haskins <ghaskins@novell.com>
Fri, 25 Jan 2008 20:08:13 +0000 (21:08 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:08:13 +0000 (21:08 +0100)
We don't need to bother searching if the task cannot be migrated

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_rt.c

index 9becc3710b609c6b6ae44ce9c413287503c80c49..72c81322fb9a040d47d8db6864546a494b8dc664 100644 (file)
@@ -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;