]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:11:54 +0000 (16:11 +0200)
commit1b8d18aa12790b7fd08e22bceae1752c1a0c4288
tree08f967e57b907d79594b29dbe5fcb01c731fd21e
parent20ab1e5198458144d42ec3590cd2239c0cb8d4ae
sched/fair: Fix condition of avg_load calculation

[ Upstream commit 6c8116c914b65be5e4d6f66d69c8142eb0648c22 ]

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: 57abff067a08 ("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:
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/sched/fair.c