[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-de5eb2dd7f171ee8a45d23cd41aa2efe9ab922b3@git.kernel.org>
Date: Wed, 24 Apr 2013 02:33:48 -0700
From: tip-bot for Joonsoo Kim <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, vatsa@...ux.vnet.ibm.com,
hpa@...or.com, mingo@...nel.org, davidlohr.bueso@...com,
a.p.zijlstra@...llo.nl, peterz@...radead.org, jason.low2@...com,
tglx@...utronix.de, iamjoonsoo.kim@....com
Subject: [tip:sched/core] sched:
Explicitly cpu_idle_type checking in rebalance_domains()
Commit-ID: de5eb2dd7f171ee8a45d23cd41aa2efe9ab922b3
Gitweb: http://git.kernel.org/tip/de5eb2dd7f171ee8a45d23cd41aa2efe9ab922b3
Author: Joonsoo Kim <iamjoonsoo.kim@....com>
AuthorDate: Tue, 23 Apr 2013 17:27:38 +0900
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 24 Apr 2013 08:52:43 +0200
sched: Explicitly cpu_idle_type checking in rebalance_domains()
After commit 88b8dac0, dst-cpu can be changed in load_balance(),
then we can't know cpu_idle_type of dst-cpu when load_balance()
return positive. So, add explicit cpu_idle_type checking.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@....com>
Tested-by: Jason Low <jason.low2@...com>
Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
Cc: Davidlohr Bueso <davidlohr.bueso@...com>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1366705662-3587-3-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/fair.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 25aaf93..726e129 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5523,10 +5523,11 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle)
if (time_after_eq(jiffies, sd->last_balance + interval)) {
if (load_balance(cpu, rq, sd, idle, &balance)) {
/*
- * We've pulled tasks over so either we're no
- * longer idle.
+ * The LBF_SOME_PINNED logic could have changed
+ * env->dst_cpu, so we can't know our idle
+ * state even if we migrated tasks. Update it.
*/
- idle = CPU_NOT_IDLE;
+ idle = idle_cpu(cpu) ? CPU_IDLE : CPU_NOT_IDLE;
}
sd->last_balance = jiffies;
}
--
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