diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2013-09-15 13:30:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-09-20 06:02:20 -0400 |
commit | 7aff2e3a56b724b79fa2d5abd10d8231ef8fb0c5 (patch) | |
tree | 7b22b4080af51729d1cc3053ac117787111c3ba2 | |
parent | 40a0c68ca9b49fb3e7292c1bae035ba5bcb27903 (diff) |
sched/balancing: Prevent the reselection of a previous env.dst_cpu if some tasks are pinned
Currently new_dst_cpu is prevented from being reselected actually, not
dst_cpu. This can result in attempting to pull tasks to this_cpu twice.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/281f59b6e596c718dd565ad267fc38f5b8e5c995.1379265590.git.vdavydov@parallels.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/sched/fair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 71c6ef58bbb9..0784ab6fcc59 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -5261,15 +5261,15 @@ more_balance: | |||
5261 | */ | 5261 | */ |
5262 | if ((env.flags & LBF_DST_PINNED) && env.imbalance > 0) { | 5262 | if ((env.flags & LBF_DST_PINNED) && env.imbalance > 0) { |
5263 | 5263 | ||
5264 | /* Prevent to re-select dst_cpu via env's cpus */ | ||
5265 | cpumask_clear_cpu(env.dst_cpu, env.cpus); | ||
5266 | |||
5264 | env.dst_rq = cpu_rq(env.new_dst_cpu); | 5267 | env.dst_rq = cpu_rq(env.new_dst_cpu); |
5265 | env.dst_cpu = env.new_dst_cpu; | 5268 | env.dst_cpu = env.new_dst_cpu; |
5266 | env.flags &= ~LBF_DST_PINNED; | 5269 | env.flags &= ~LBF_DST_PINNED; |
5267 | env.loop = 0; | 5270 | env.loop = 0; |
5268 | env.loop_break = sched_nr_migrate_break; | 5271 | env.loop_break = sched_nr_migrate_break; |
5269 | 5272 | ||
5270 | /* Prevent to re-select dst_cpu via env's cpus */ | ||
5271 | cpumask_clear_cpu(env.dst_cpu, env.cpus); | ||
5272 | |||
5273 | /* | 5273 | /* |
5274 | * Go back to "more_balance" rather than "redo" since we | 5274 | * Go back to "more_balance" rather than "redo" since we |
5275 | * need to continue with same src_cpu. | 5275 | * need to continue with same src_cpu. |