From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx204.postini.com [74.125.245.204]) by kanga.kvack.org (Postfix) with SMTP id 2F5076B0092 for ; Mon, 26 Mar 2012 15:08:49 -0400 (EDT) From: Andrea Arcangeli Subject: [PATCH 24/39] autonuma: fix finding idlest cpu Date: Mon, 26 Mar 2012 19:46:11 +0200 Message-Id: <1332783986-24195-25-git-send-email-aarcange@redhat.com> In-Reply-To: <1332783986-24195-1-git-send-email-aarcange@redhat.com> References: <1332783986-24195-1-git-send-email-aarcange@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Hillf Danton , Dan Smith , Peter Zijlstra , Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Bharata B Rao , Lee Schermerhorn , Rik van Riel , Johannes Weiner From: Hillf Danton If autonuma not enabled, no cpu is selected, which is behavior change. We have to fix it. Signed-off-by: Hillf Danton Signed-off-by: Andrea Arcangeli --- 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org