[CPUFREQ] ondemand,conservative governor store the idle ticks for all cpus
authorDave Jones <davej@redhat.com>
Wed, 1 Jun 2005 02:03:49 +0000 (19:03 -0700)
committerDave Jones <davej@redhat.com>
Wed, 1 Jun 2005 02:03:49 +0000 (19:03 -0700)
[PATCH] [2/5] ondemand,conservative governor store the idle ticks for all cpus

Ondemand, conservative governor did not store prev_cpu_idle_up into
prev_cpu_idle_down for other CPUs than the current CPU.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_ondemand.c

index 3082a3fa5ec48ef424a061f02a9ba241a74e95b7..c503ec14765f77dd3bc5d618393a1bfde1b1c3ba 100644 (file)
@@ -369,7 +369,13 @@ static void dbs_check_cpu(int cpu)
 
        if (idle_ticks < up_idle_ticks) {
                down_skip[cpu] = 0;
-               this_dbs_info->prev_cpu_idle_down = total_idle_ticks;
+               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;
+               }
                /* if we are already at full speed then break out early */
                if (requested_freq[cpu] == policy->max)
                        return;
index 26cf54b11ba6278ac565d814825118a928819e77..f239545ac1b84df92b4e0fa04d5078726d68ea08 100644 (file)
@@ -355,7 +355,13 @@ static void dbs_check_cpu(int cpu)
 
        if (idle_ticks < up_idle_ticks) {
                down_skip[cpu] = 0;
-               this_dbs_info->prev_cpu_idle_down = total_idle_ticks;
+               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;
+               }
                /* if we are already at full speed then break out early */
                if (policy->cur == policy->max)
                        return;