Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[CPUFREQ] ondemand,conservative governor store the idle ticks for all cpus

[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>

+14 -2
+7 -1
drivers/cpufreq/cpufreq_conservative.c
··· 369 369 370 370 if (idle_ticks < up_idle_ticks) { 371 371 down_skip[cpu] = 0; 372 - this_dbs_info->prev_cpu_idle_down = total_idle_ticks; 372 + for_each_cpu_mask(j, policy->cpus) { 373 + struct cpu_dbs_info_s *j_dbs_info; 374 + 375 + j_dbs_info = &per_cpu(cpu_dbs_info, j); 376 + j_dbs_info->prev_cpu_idle_down = 377 + j_dbs_info->prev_cpu_idle_up; 378 + } 373 379 /* if we are already at full speed then break out early */ 374 380 if (requested_freq[cpu] == policy->max) 375 381 return;
+7 -1
drivers/cpufreq/cpufreq_ondemand.c
··· 355 355 356 356 if (idle_ticks < up_idle_ticks) { 357 357 down_skip[cpu] = 0; 358 - this_dbs_info->prev_cpu_idle_down = total_idle_ticks; 358 + for_each_cpu_mask(j, policy->cpus) { 359 + struct cpu_dbs_info_s *j_dbs_info; 360 + 361 + j_dbs_info = &per_cpu(cpu_dbs_info, j); 362 + j_dbs_info->prev_cpu_idle_down = 363 + j_dbs_info->prev_cpu_idle_up; 364 + } 359 365 /* if we are already at full speed then break out early */ 360 366 if (policy->cur == policy->max) 361 367 return;