mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
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:
committed by
Arve Hjønnevåg
parent
6bb28b20af
commit
beb070f3d4
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user