[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1332783986-24195-23-git-send-email-aarcange@redhat.com>
Date: Mon, 26 Mar 2012 19:46:09 +0200
From: Andrea Arcangeli <aarcange@...hat.com>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: Hillf Danton <dhillf@...il.com>, Dan Smith <danms@...ibm.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, Paul Turner <pjt@...gle.com>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Mike Galbraith <efault@....de>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Bharata B Rao <bharata.rao@...il.com>,
Lee Schermerhorn <Lee.Schermerhorn@...com>,
Rik van Riel <riel@...hat.com>,
Johannes Weiner <hannes@...xchg.org>
Subject: [PATCH 22/39] autonuma: select_task_rq_fair cleanup new_cpu < 0 fix
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 <aarcange@...hat.com>
---
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists