[CPUFREQ] ondemand: don't increase to full speed at startup (Bruno Ducrot) From: Bruno Ducrot dbs_timer_init() will schedule_work(&dbs_work) so that do_dbs_timer() is likely called very early at same time slice scheduler, and for each cpu, dbs_check_cpu(cpu) will be called, likely at the same time slice than dbs_timer_init(). So far, we will get total_idle_ticks == idle_ticks == 0 unconditonaly, and the processor will be put at full speed even though it's not needed at startup. Ack'ed by Venkatesh Pallipadi. Signed-off-by: Bruno Ducrot Signed-off-by: Dominik Brodowski --- drivers/cpufreq/cpufreq_ondemand.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: 2.6.10/drivers/cpufreq/cpufreq_ondemand.c =================================================================== --- 2.6.10.orig/drivers/cpufreq/cpufreq_ondemand.c 2004-12-25 17:42:16.016322718 +0100 +++ 2.6.10/drivers/cpufreq/cpufreq_ondemand.c 2004-12-25 17:42:46.241015631 +0100 @@ -359,7 +359,8 @@ static inline void dbs_timer_init(void) { INIT_WORK(&dbs_work, do_dbs_timer, NULL); - schedule_work(&dbs_work); + schedule_delayed_work(&dbs_work, + sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate)); return; }