[CPUFREQ] use max load in conservative governor

Instead of using the load of the last CPU in a package, use the
maximum load of all CPUs in a package.

Reported-by: Jean-Christian Goussard <jeanchristian.goussard@sfr.fr>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Dave Jones <davej@redhat.com>

authored by Dominik Brodowski and committed by Dave Jones fd187aaf 499bca9b

+6 -2
+6 -2
drivers/cpufreq/cpufreq_conservative.c
··· 444 static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) 445 { 446 unsigned int load = 0; 447 unsigned int freq_target; 448 449 struct cpufreq_policy *policy; ··· 502 continue; 503 504 load = 100 * (wall_time - idle_time) / wall_time; 505 } 506 507 /* ··· 515 return; 516 517 /* Check for frequency increase */ 518 - if (load > dbs_tuners_ins.up_threshold) { 519 this_dbs_info->down_skip = 0; 520 521 /* if we are already at full speed then break out early */ ··· 542 * can support the current CPU usage without triggering the up 543 * policy. To be safe, we focus 10 points under the threshold. 544 */ 545 - if (load < (dbs_tuners_ins.down_threshold - 10)) { 546 freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100; 547 548 this_dbs_info->requested_freq -= freq_target;
··· 444 static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) 445 { 446 unsigned int load = 0; 447 + unsigned int max_load = 0; 448 unsigned int freq_target; 449 450 struct cpufreq_policy *policy; ··· 501 continue; 502 503 load = 100 * (wall_time - idle_time) / wall_time; 504 + 505 + if (load > max_load) 506 + max_load = load; 507 } 508 509 /* ··· 511 return; 512 513 /* Check for frequency increase */ 514 + if (max_load > dbs_tuners_ins.up_threshold) { 515 this_dbs_info->down_skip = 0; 516 517 /* if we are already at full speed then break out early */ ··· 538 * can support the current CPU usage without triggering the up 539 * policy. To be safe, we focus 10 points under the threshold. 540 */ 541 + if (max_load < (dbs_tuners_ins.down_threshold - 10)) { 542 freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100; 543 544 this_dbs_info->requested_freq -= freq_target;