Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

From: Viresh Kumar
Date: Thu Feb 18 2021 - 07:00:56 EST


On 18-02-21, 16:25, Yue Hu wrote:
> From: Yue Hu <huyue2@xxxxxxxxxx>
>
> For busy CPU case, we do not need to avoid freq reduction if limits
> change since commit 600f5badb78c ("cpufreq: schedutil: Don't skip
> freq update when limits change").
>
> Later, commit 23a881852f3e ("cpufreq: schedutil: Don't skip freq
> update if need_freq_update is set") discarded the need_freq_update
> check for special case of busy CPU because we won't abort a frequency
> update anymore if need_freq_update is set.
>
> That is nonlogical since we will not reduce the freq for busy CPU
> if the computed next_f is really reduced when limits change.

Schedutil governor will probably ask for a higher frequency than
allowed, but cpufreq core will clamp the request between policy
min/max before updating the frequency here.

We added the check in 600f5badb78c here earlier as there were chances
that we will abort the operation without reaching to cpufreq core,
which won't happen now.

--
viresh