Commit 85d48ae6 authored by zgpeng's avatar zgpeng Committed by sanglipeng
Browse files

sched/fair: Move calculate of avg_load to a better location

stable inclusion
from stable-v5.10.178
commit 68387ae3b63e7bd1723767ce1bc2186e82490208
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8ALH3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=68387ae3b63e7bd1723767ce1bc2186e82490208



--------------------------------

[ Upstream commit 06354900 ]

In calculate_imbalance function, when the value of local->avg_load is
greater than or equal to busiest->avg_load, the calculated sds->avg_load is
not used. So this calculation can be placed in a more appropriate position.

Signed-off-by: default avatarzgpeng <zgpeng@tencent.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarSamuel Liao <samuelliao@tencent.com>
Reviewed-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/1649239025-10010-1-git-send-email-zgpeng@tencent.com


Stable-dep-of: 91dcf1e8 ("sched/fair: Fix imbalance overflow")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent a4ee9db6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment