diff options
author | Jocelyn Falempe <jocelyn.falempe@motorola.com> | 2009-09-22 14:27:24 +0200 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2010-02-08 15:36:08 -0800 |
commit | beb070f3d41fb82c69c6dcec1293817c7c788d10 (patch) | |
tree | e0173278518bb849355ec31b556583603a27e0b3 | |
parent | 6bb28b20afd42640ea80bcaabe4c24c3a8fe87e1 (diff) |
cpufreq: ondemand: Don't synchronize sample rate unless mulitple cpus present
For UP systems this is not required, and results in a more consistent
sample interval.
Signed-off-by: Jocelyn Falempe <jocelyn.falempe@motorola.com>
Signed-off-by: Mike Chan <mike@android.com>
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 4b34ade2332b..5211924e45fb 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -576,7 +576,9 @@ static void do_dbs_timer(struct work_struct *work) /* We want all CPUs to do sampling nearly on same jiffy */ int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate); - delay -= jiffies % delay; + if (num_online_cpus() > 1) + delay -= jiffies % delay; + mutex_lock(&dbs_info->timer_mutex); /* Common NORMAL_SAMPLE setup */ |