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