ondemand governor store the idle ticks for all cpus
PATCH 2/2 ondemand governor store the idle ticks for all cpus
Hello,
While doing the previous cleanup I noticed that until now only the prev_cpu_idle_up of the current CPU would be stored to prev_cpu_idle_down. In case of several associated CPUs, all the measurement is based on looking every CPU statistic. Therefore it is necessary to also save the prev_cpu_idle_up of the other associated CPUs.
This patch fixes this by adding a small loop. As the previous patch, it's against 2.6.11 and only tested on a monoprocessor PC.
Eric
PS: I couldn't find any documentation concerning the implementation of several CPUs with a frequency attached, is there any reference?
--
Ondemand governor did not store prev_cpu_idle_up into prev_cpu_idle_down for other CPUs than the current CPU.
--
drivers/cpufreq/cpufreq_ondemand.c renamed from drivers/cpufreq/cpufreq_ondemand.c.clean2 +6 -1
@@ -277,7 +277,12 @@__cpufreq_driver_target (policy, policy->max,CPUFREQ_RELATION_H ); down_skip[cpu] =0 ; - this_dbs_info->prev_cpu_idle_down = this_dbs_info->prev_cpu_idle_up; +for_each_cpu_mask (j, policy->cpus) { +struct cpu_dbs_info_s *j_dbs_info; + + j_dbs_info = &per_cpu (cpu_dbs_info, j); + j_dbs_info->prev_cpu_idle_down = j_dbs_info->prev_cpu_idle_up; + }return ; }
_______________________________________________
Cpufreq mailing list
[email protected]
http://lists.linux.org.uk/mailman/listinfo/cpufreq