schedutil: Smoothen predicted load boosting

To prevent spikes in CPU frequency selection, let's make sure that
instead of immediately switching to WALT's predicted load (if > *util),
we average it out and produce a smoother, more realistic load boost.

Change-Id: Ifcdf12bb2daf23ba9b4ec55ac26069dd48876c42
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
Tyler Nijmeh 2020-10-27 20:41:47 +03:00 committed by Richard Raya
parent 4d42f71668
commit 7f1de0f5d2

View File

@ -433,10 +433,10 @@ static void sugov_walt_adjust(struct sugov_cpu *sg_cpu, unsigned long *util,
if (is_hiload && nl >= mult_frac(cpu_util, NL_RATIO, 100))
*util = *max;
if (sg_policy->tunables->pl) {
if (sg_policy->tunables->pl && pl > *util) {
if (conservative_pl())
pl = mult_frac(pl, TARGET_LOAD, 100);
*util = max(*util, pl);
*util = (*util + pl) / 2;
}
}