Commit e0f364f4 authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds

[PATCH] sched: cleanup wake_idle

New sched-domains code means we don't get spans with offline CPUs in
them.
Signed-off-by: default avatarNick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 44f410a7
...@@ -927,14 +927,14 @@ static int wake_idle(int cpu, task_t *p) ...@@ -927,14 +927,14 @@ static int wake_idle(int cpu, task_t *p)
for_each_domain(cpu, sd) { for_each_domain(cpu, sd) {
if (sd->flags & SD_WAKE_IDLE) { if (sd->flags & SD_WAKE_IDLE) {
cpus_and(tmp, sd->span, cpu_online_map); cpus_and(tmp, sd->span, p->cpus_allowed);
cpus_and(tmp, tmp, p->cpus_allowed);
for_each_cpu_mask(i, tmp) { for_each_cpu_mask(i, tmp) {
if (idle_cpu(i)) if (idle_cpu(i))
return i; return i;
} }
} }
else break; else
break;
} }
return cpu; return cpu;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment