From: Rafael J. Wysocki Date: Sun, 3 Sep 2017 22:05:42 +0000 (+0200) Subject: Merge branch 'intel_pstate' X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab271bc95b40960799c084b0e94a33c4272ec0bf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'intel_pstate' * intel_pstate: cpufreq: intel_pstate: Shorten a couple of long names cpufreq: intel_pstate: Simplify intel_pstate_adjust_pstate() cpufreq: intel_pstate: Improve IO performance with per-core P-states cpufreq: intel_pstate: Drop INTEL_PSTATE_HWP_SAMPLING_INTERVAL cpufreq: intel_pstate: Drop ->update_util from pstate_funcs cpufreq: intel_pstate: Do not use PID-based P-state selection --- ab271bc95b40960799c084b0e94a33c4272ec0bf diff --cc drivers/cpufreq/intel_pstate.c index 0c50637e6bda,d5a61f45a00c..8f95265d5f52 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@@ -1767,12 -1525,17 +1525,21 @@@ static void intel_pstate_update_util(st struct cpudata *cpu = container_of(data, struct cpudata, update_util); u64 delta_ns; + /* Don't allow remote callbacks */ + if (smp_processor_id() != cpu->cpu) + return; + if (flags & SCHED_CPUFREQ_IOWAIT) { cpu->iowait_boost = int_tofp(1); + cpu->last_update = time; + /* + * The last time the busy was 100% so P-state was max anyway + * so avoid overhead of computation. + */ + if (fp_toint(cpu->sample.busy_scaled) == 100) + return; + + goto set_pstate; } else if (cpu->iowait_boost) { /* Clear iowait_boost if the CPU may have been idle. */ delta_ns = time - cpu->last_update;