diff options
author | Gregory Haskins <ghaskins@novell.com> | 2008-01-25 15:08:13 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:13 -0500 |
commit | 17b3279b48835eb522d842eae16f541da3729c8a (patch) | |
tree | c94c7da732fbefda4a938bb6479ebb3b6d8d0c82 /kernel/sched_rt.c | |
parent | e1f47d891c0f00769d6d40ac5740f943e998d089 (diff) |
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: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 9becc3710b60..72c81322fb9a 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -176,7 +176,8 @@ static int select_task_rq_rt(struct task_struct *p, int sync) | |||
176 | * that is just being woken and probably will have | 176 | * that is just being woken and probably will have |
177 | * cold cache anyway. | 177 | * cold cache anyway. |
178 | */ | 178 | */ |
179 | if (unlikely(rt_task(rq->curr))) { | 179 | if (unlikely(rt_task(rq->curr)) && |
180 | (p->nr_cpus_allowed > 1)) { | ||
180 | int cpu = find_lowest_rq(p); | 181 | int cpu = find_lowest_rq(p); |
181 | 182 | ||
182 | return (cpu == -1) ? task_cpu(p) : cpu; | 183 | return (cpu == -1) ? task_cpu(p) : cpu; |