Skip to contentSkip to conversation

ondemand put processors at full speed at startup

PATCH New Bruno Ducrot 1 participant 1 message Dec 16, 2004 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ondemand put processors at full speed at startup

Hi,

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.

 drivers/cpufreq/cpufreq_ondemand.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/cpufreq/cpufreq_ondemand.c +2 -1
@@ -359,7 +359,8 @@ static void do_dbs_timer(void *data)
 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;
 }
 
Signature · 4 lines
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.