aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@stericsson.com>2011-02-10 11:06:42 +0100
committerJonas ABERG <jonas.aberg@stericsson.com>2011-02-14 13:28:11 +0100
commitc3c885e5cbae01e25d444dbfb5229f40438f99e7 (patch)
treeb4a6c85dab12a8793b8a2b625d466348381a0e81 /drivers/cpufreq
parentf50accab7f3e693852cb2a139ad7c7b20319ea6d (diff)
update delay after dbs_cpu_check
calculate ondemand delay after dbs_check_cpu call because it can modify rate_mult value use freq_lo_jiffies value for the sub sample period of powersave_bias mode ST-Ericsson ID: 320302 Change-Id: I5d322b9a8521c12231770bce6b26bc4a5a2e095d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/15200 Reviewed-by: Martin PERSSON <martin.persson@stericsson.com> Tested-by: Martin PERSSON <martin.persson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 58906e13029..dd0b605dbd1 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -663,10 +663,16 @@ static void do_dbs_timer(struct work_struct *work)
/* Setup timer for SUB_SAMPLE */
dbs_info->sample_type = DBS_SUB_SAMPLE;
delay = dbs_info->freq_hi_jiffies;
+ } else {
+ /* We want all CPUs to do sampling nearly on same jiffy */
+ delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate
+ * dbs_info->rate_mult);
+ delay -= jiffies % delay;
}
} else {
__cpufreq_driver_target(dbs_info->cur_policy,
dbs_info->freq_lo, CPUFREQ_RELATION_H);
+ delay = dbs_info->freq_lo_jiffies;
}
queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
mutex_unlock(&dbs_info->timer_mutex);