aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/fair.c
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-04-23 04:27:37 -0400
committerIngo Molnar <mingo@kernel.org>2013-04-24 02:52:43 -0400
commitf1cd0858100c67273f2c74344e0c464344c4a982 (patch)
tree1b3acc84023a16fabf7c37bf0bdb782fe25094cb /kernel/sched/fair.c
parent642dbc39ab1ea00f47e0fee1b8e8a27da036d940 (diff)
sched: Change position of resched_cpu() in load_balance()
cur_ld_moved is reset if env.flags hit LBF_NEED_BREAK. So, there is possibility that we miss doing resched_cpu(). Correct it as changing position of resched_cpu() before checking LBF_NEED_BREAK. 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-2-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r--kernel/sched/fair.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1c977350e322..25aaf93281de 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5080,17 +5080,17 @@ more_balance:
5080 double_rq_unlock(env.dst_rq, busiest); 5080 double_rq_unlock(env.dst_rq, busiest);
5081 local_irq_restore(flags); 5081 local_irq_restore(flags);
5082 5082
5083 if (env.flags & LBF_NEED_BREAK) {
5084 env.flags &= ~LBF_NEED_BREAK;
5085 goto more_balance;
5086 }
5087
5088 /* 5083 /*
5089 * some other cpu did the load balance for us. 5084 * some other cpu did the load balance for us.
5090 */ 5085 */
5091 if (cur_ld_moved && env.dst_cpu != smp_processor_id()) 5086 if (cur_ld_moved && env.dst_cpu != smp_processor_id())
5092 resched_cpu(env.dst_cpu); 5087 resched_cpu(env.dst_cpu);
5093 5088
5089 if (env.flags & LBF_NEED_BREAK) {
5090 env.flags &= ~LBF_NEED_BREAK;
5091 goto more_balance;
5092 }
5093
5094 /* 5094 /*
5095 * Revisit (affine) tasks on src_cpu that couldn't be moved to 5095 * Revisit (affine) tasks on src_cpu that couldn't be moved to
5096 * us and move them to an alternate dst_cpu in our sched_group 5096 * us and move them to an alternate dst_cpu in our sched_group