Commit 441f331c authored by Dave Jones's avatar Dave Jones

[CPUFREQ] ondemand: don't increase to full speed at startup (Bruno Ducrot)

From: Bruno Ducrot <ducrot@poupinou.org>

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: default avatarBruno Ducrot <ducrot@poupinou.org>
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 01c32eef
...@@ -359,7 +359,8 @@ static void do_dbs_timer(void *data) ...@@ -359,7 +359,8 @@ static void do_dbs_timer(void *data)
static inline void dbs_timer_init(void) static inline void dbs_timer_init(void)
{ {
INIT_WORK(&dbs_work, do_dbs_timer, NULL); 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; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment