On Thu, Dec 22, 2016 at 11:58:50PM +0800, Leo Yan wrote:
Current code select busiest rq mostly consider only from weighted load this point of view; so it's possible to select one CPU with most weighted load value but this load are contributes by some small load tasks, on the other hand there have one another CPU with misfit task but it may have no chance to migrate task to higher capacity CPU.
This patch is to add one more checking for selection busiest rq if find only one misfit task on the rq and it's possible to migrate task from lower capacity CPU to higher capacity CPU.
Signed-off-by: Leo Yan leo.yan@linaro.org
kernel/sched/fair.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ed9fbed..1cf0e37 100755 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7777,6 +7777,24 @@ static struct rq *find_busiest_queue(struct lb_env *env, continue;
/*
* After enable energy awared scheduling, it has higher
* priority to migrate misfit task rather than from most
* loaded CPU; E.g. one CPU with single misfit task and
* other CPUs with multiple lower load tasks, we should
* firstly make sure the misfit task can be migrated onto
* higher capacity CPU.
*/
if (energy_aware() &&
capacity_orig_of(i) < capacity_orig_of(env->dst_cpu) &&
Do you want to check capacity_of() as well as capacity_orig_of()?
Thanks, Joonwoo