[PATCH 24/39] autonuma: fix finding idlest cpu

From: Andrea Arcangeli
Date: Mon Mar 26 2012 - 15:09:14 EST


From: Hillf Danton <dhillf@xxxxxxxxx>

If autonuma not enabled, no cpu is selected, which is behavior change.
We have to fix it.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
---
kernel/sched/fair.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 166168d..bf109cc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2619,11 +2619,11 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)

/* Traverse only the allowed CPUs */
for_each_cpu_and(i, sched_group_cpus(group), tsk_cpus_allowed(p)) {
- if (task_autonuma_cpu(p, i))
- continue;
load = weighted_cpuload(i);

if (load < min_load || (load == min_load && i == this_cpu)) {
+ if (!task_autonuma_cpu(p, i))
+ continue;
min_load = load;
idlest = i;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/