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>
This commit is contained in:
Jocelyn Falempe
2009-09-22 14:27:24 +02:00
committed by Arve Hjønnevåg
parent 6bb28b20af
commit beb070f3d4

View File

@@ -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 */