sched/walt: fix target load crossover

This change is for general scheduler improvement.

Change-Id: I28ccf141ccd52c0b8afc4548f83dd4e69b954670
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:
Shaleen Agrawal 2021-10-06 17:00:05 -07:00 committed by Rishabh Bhatnagar
parent e35de28c32
commit 1900694cd0

View File

@ -210,7 +210,10 @@ static inline unsigned long walt_map_util_freq(unsigned long util,
if (util >= wg_policy->tunables->target_load_thresh &&
cpu_util_rt(cpu_rq(cpu)) < (cap >> 2))
return (fmax + (fmax >> shift)) * util / cap;
return max(
(fmax + (fmax >> shift)) * util,
(fmax + (fmax >> 2)) * wg_policy->tunables->target_load_thresh
)/cap;
return (fmax + (fmax >> 2)) * util / cap;
}