]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: schedutil: restore cached freq when next_f is not changed
authorWei Wang <wvw@google.com>
Fri, 16 Oct 2020 18:17:22 +0000 (11:17 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 19 Oct 2020 15:38:16 +0000 (17:38 +0200)
commit7be6c7e09abeef8f1297c85c123dfb137118a0ac
treeaf556351e9a36f65cc3d558dcabd9b249fd77348
parent9284cb273956f9fb256f1f994a128a940e60a14d
cpufreq: schedutil: restore cached freq when next_f is not changed

We have the raw cached freq to reduce the chance in calling cpufreq
driver where it could be costly in some arch/SoC.

Currently, the raw cached freq is reset in sugov_update_single() when
it avoids frequency reduction (which is not desirable sometimes), but
it is better to restore the previous value of it in that case,
because it may not change in the next cycle and it is not necessary
to change the CPU frequency then.

Adapted from https://android-review.googlesource.com/1352810/

Signed-off-by: Wei Wang <wvw@google.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Subject edit and changelog rewrite ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/sched/cpufreq_schedutil.c