From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx203.postini.com [74.125.245.203]) by kanga.kvack.org (Postfix) with SMTP id E49E36B0083 for ; Mon, 26 Mar 2012 15:08:48 -0400 (EDT) From: Andrea Arcangeli Subject: [PATCH 22/39] autonuma: select_task_rq_fair cleanup new_cpu < 0 fix Date: Mon, 26 Mar 2012 19:46:09 +0200 Message-Id: <1332783986-24195-23-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 Cleanup comment in the case find_idlest_cpu returned -1 and check for < 0 instead of == -1 as it should allow gcc to generate more optimal code. Signed-off-by: Andrea Arcangeli --- kernel/sched/fair.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a8498e0..0c60f46 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2792,10 +2792,9 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags) if (new_cpu == -1 || new_cpu == cpu) { /* Now try balancing at a lower domain level of cpu */ sd = sd->child; - if (new_cpu == -1) { - /* Only for certain that new cpu is valid */ + if (new_cpu < 0) + /* Return prev_cpu is find_idlest_cpu failed */ new_cpu = prev_cpu; - } continue; } -- 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