sched/fair: Avoid force newly idle load balance if have iowait task

If this runqueue have iowait task and still force newly
idle load balance, will make iowait task performance
worse. Need to do the average idle time check if
there is iowait task on this runqueue to have upcoming
iowait task have enough cpu resource.

Change-Id: I8e4dd440edbbd14d5170fbcf358bdaf5cc5b26e8
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Signed-off-by: Biao Long <blong@codeaurora.org>
This commit is contained in:
Maria Yu 2019-04-22 14:58:52 +08:00 committed by Gerrit - the friendly Code Review server
parent 5250fc5df0
commit fbd15b6297

View File

@ -11590,7 +11590,8 @@ static int idle_balance(struct rq *this_rq, struct rq_flags *rf)
*/
if (!cpu_active(this_cpu))
return 0;
if (!is_min_capacity_cpu(this_cpu) && silver_has_big_tasks())
if (!is_min_capacity_cpu(this_cpu) && silver_has_big_tasks()
&& (atomic_read(&this_rq->nr_iowait) == 0))
avg_idle = ULLONG_MAX;
/*
* This is OK, because current is on_cpu, which avoids it being picked