]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Fix condition of avg_load calculation
authorTao Zhou <ouwen210@hotmail.com>
Thu, 19 Mar 2020 03:39:20 +0000 (11:39 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Mar 2020 12:06:20 +0000 (13:06 +0100)
commit0d55af443d9a886298e3057cc09d28577be56ddc
tree380520e9cbfbe99435df4f285d5894f0a2dfa840
parentdbc2e4ec071dc99182146ba67e34eb8af414b424
sched/fair: Fix condition of avg_load calculation

In update_sg_wakeup_stats(), the comment says:

Computing avg_load makes sense only when group is fully
busy or overloaded.

But, the code below this comment does not check like this.

From reading the code about avg_load in other functions, I
confirm that avg_load should be calculated in fully busy or
overloaded case. The comment is correct and the checking
condition is wrong. So, change that condition.

Fixes: cf60856dc38a ("sched/fair: Rework find_idlest_group()")
Signed-off-by: Tao Zhou <ouwen210@hotmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Link: https://lkml.kernel.org/r/Message-ID:
kernel/sched/fair.c