diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2013-04-23 04:27:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-04-24 02:52:43 -0400 |
commit | de5eb2dd7f171ee8a45d23cd41aa2efe9ab922b3 (patch) | |
tree | 14ad92528f988552549ee962b9274911a0e16c92 /kernel/sched | |
parent | f1cd0858100c67273f2c74344e0c464344c4a982 (diff) |
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@lge.com>
Tested-by: Jason Low <jason.low2@hp.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1366705662-3587-3-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/fair.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 25aaf93281de..726e12905725 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) | |||
5523 | if (time_after_eq(jiffies, sd->last_balance + interval)) { | 5523 | if (time_after_eq(jiffies, sd->last_balance + interval)) { |
5524 | if (load_balance(cpu, rq, sd, idle, &balance)) { | 5524 | if (load_balance(cpu, rq, sd, idle, &balance)) { |
5525 | /* | 5525 | /* |
5526 | * We've pulled tasks over so either we're no | 5526 | * The LBF_SOME_PINNED logic could have changed |
5527 | * longer idle. | 5527 | * env->dst_cpu, so we can't know our idle |
5528 | * state even if we migrated tasks. Update it. | ||
5528 | */ | 5529 | */ |
5529 | idle = CPU_NOT_IDLE; | 5530 | idle = idle_cpu(cpu) ? CPU_IDLE : CPU_NOT_IDLE; |
5530 | } | 5531 | } |
5531 | sd->last_balance = jiffies; | 5532 | sd->last_balance = jiffies; |
5532 | } | 5533 | } |