cpufreq: ondemand: call dbs_check_cpu only when necessary
Modify ondemand timer to not resample CPU utilization if recently
sampled from another SW coordinated core.
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index b0e4506..ee8b7ca 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -290,6 +290,9 @@
mutex_unlock(&dbs_data->mutex);
if (dbs_sw_coordinated_cpus(cpu_cdbs)) {
+ /* Initiate timer time stamp */
+ cpu_cdbs->time_stamp = ktime_get();
+
for_each_cpu(j, policy->cpus) {
struct cpu_dbs_common_info *j_cdbs;