sched: Prevent to re-select dst-cpu in load_balance()
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>
Tue, 23 Apr 2013 08:27:42 +0000 (17:27 +0900)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Apr 2013 06:52:46 +0000 (08:52 +0200)
commite02e60c109ca70935bad1131976bdbf5160cf576
tree56295c7eacea90fb95a2febf178ea287664e4407
parente6252c3ef4b9cd251b53f7b68035f395d20b044e
sched: Prevent to re-select dst-cpu in load_balance()

Commit 88b8dac0 makes load_balance() consider other cpus in its
group. But, in that, there is no code for preventing to
re-select dst-cpu. So, same dst-cpu can be selected over and
over.

This patch add functionality to load_balance() in order to
exclude cpu which is selected once. We prevent to re-select
dst_cpu via env's cpus, so now, env's cpus is a candidate not
only for src_cpus, but also dst_cpus.

With this patch, we can remove lb_iterations and
max_lb_iterations, because we decide whether we can go ahead or
not via env's cpus.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Jason Low <jason.low2@hp.com>
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-7-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c