alistair23-linux/drivers/cpufreq
Srinivas Pandruvada 6e34e1f23d cpufreq: intel_pstate: Correct the busy calculation for KNL
The busy percent calculated for the Knights Landing (KNL) platform
is 1024 times smaller than the correct busy value.  This causes
performance to get stuck at the lowest ratio.

The scaling algorithm used for KNL is performance-based, but it still
looks at the CPU load to set the scaled busy factor to 0 when the
load is less than 1 percent.  In this case, since the computed load
is 1024x smaller than it should be, the scaled busy factor will
always be 0, irrespective of CPU business.

This needs a fix similar to the turbostat one in commit b2b34dfe4d
(tools/power turbostat: KNL workaround for %Busy and Avg_MHz).

For this reason, add one more callback to processor-specific
callbacks to specify an MPERF multiplier represented by a number of
bit positions to shift the value of that register to the left to
copmensate for its rate difference with respect to the TSC.  This
shift value is used during CPU busy calculations.

Fixes: ffb810563c (intel_pstate: Avoid getting stuck in high P-states when idle)
Reported-and-tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: 4.6+ <stable@vger.kernel.org> # 4.6+
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-07-14 03:01:28 +02:00
..
acpi-cpufreq.c cpufreq: Remove CPU hotplug callbacks only if they were initialized 2016-12-21 02:52:52 +01:00
amd_freq_sensitivity.c
arm_big_little.c
arm_big_little.h
arm_big_little_dt.c
at32ap-cpufreq.c
blackfin-cpufreq.c
bmips-cpufreq.c cpufreq: bmips-cpufreq: CPUfreq driver for Broadcom's BMIPS SoCs 2017-02-09 01:22:44 +01:00
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: remove unnecessary platform_set_drvdata() 2017-02-09 01:22:46 +01:00
cppc_cpufreq.c cpufreq / CPPC: Add MODULE_DEVICE_TABLE for cppc_cpufreq driver 2016-10-21 15:11:23 +02:00
cpufreq-dt-platdev.c cpufreq: dt: Don't use generic platdev driver for ti-cpufreq platforms 2017-02-09 22:59:00 +01:00
cpufreq-dt.c PM / OPP: Rename dev_pm_opp_get_suspend_opp() and return OPP rate 2017-01-27 11:49:09 +01:00
cpufreq-dt.h cpufreq: dt: Support governor tunables per policy 2016-09-13 02:39:12 +02:00
cpufreq-nforce2.c
cpufreq.c x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF 2017-06-27 01:47:32 +02:00
cpufreq_conservative.c cpufreq: conservative: Allow down_threshold to take values from 1 to 10 2017-06-12 14:28:07 +02:00
cpufreq_governor.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/cpufreq.h> 2017-03-02 08:42:30 +01:00
cpufreq_governor.h sched/headers: Prepare for new header dependencies before moving code to <linux/sched/cpufreq.h> 2017-03-02 08:42:30 +01:00
cpufreq_governor_attr_set.c
cpufreq_ondemand.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/cpufreq.h> 2017-03-02 08:42:30 +01:00
cpufreq_ondemand.h
cpufreq_performance.c
cpufreq_powersave.c
cpufreq_stats.c Power management updates for v4.11-rc1 2017-02-20 17:41:31 -08:00
cpufreq_userspace.c
cris-artpec3-cpufreq.c
cris-etraxfs-cpufreq.c
davinci-cpufreq.c ARM: davinci: da850: fix da850_set_pll0rate() 2017-01-02 15:02:51 +05:30
dbx500-cpufreq.c cpufreq: dbx500: Manage cooling device from cpufreq driver 2017-03-16 00:14:31 +01:00
e_powersaver.c
elanfreq.c
exynos5440-cpufreq.c PM / OPP: Update OPP users to put reference 2017-01-30 09:22:21 +01:00
freq_table.c
gx-suspmod.c
highbank-cpufreq.c
ia64-acpi-cpufreq.c cpufreq/ia64: Replace racy task affinity logic 2017-04-15 12:20:55 +02:00
imx6q-cpufreq.c cpufreq: imx6q: Fix error handling code 2017-04-19 23:22:01 +02:00
intel_pstate.c cpufreq: intel_pstate: Correct the busy calculation for KNL 2017-07-14 03:01:28 +02:00
Kconfig cpufreq: qoriq: add ARM64 SoCs support 2017-02-09 14:33:01 +01:00
Kconfig.arm cpufreq: dbx500: add a Kconfig symbol 2017-05-14 13:40:16 +02:00
Kconfig.powerpc
Kconfig.x86 sched/x86: Change CONFIG_SCHED_ITMT to CONFIG_SCHED_MC_PRIO 2016-11-30 08:27:08 +01:00
kirkwood-cpufreq.c cpufreq: kirkwood-cpufreq:- Handle return value of clk_prepare_enable() 2017-05-30 00:09:41 +02:00
longhaul.c
longhaul.h
longrun.c
loongson1-cpufreq.c
loongson2_cpufreq.c CPUFREQ: Loongson2: drop set_cpus_allowed_ptr() 2017-04-12 13:52:21 +02:00
Makefile cpufreq: dbx500: add a Kconfig symbol 2017-05-14 13:40:16 +02:00
maple-cpufreq.c
mt8173-cpufreq.c cpufreq: mediatek: Add support for MT8176 and MT817x 2017-03-12 23:10:53 +01:00
mvebu-cpufreq.c
omap-cpufreq.c PM / OPP: Update OPP users to put reference 2017-01-30 09:22:21 +01:00
p4-clockmod.c
pasemi-cpufreq.c
pcc-cpufreq.c
pmac32-cpufreq.c
pmac64-cpufreq.c
powernow-k6.c
powernow-k7.c
powernow-k7.h
powernow-k8.c format-security: move static strings to const 2017-05-08 17:15:14 -07:00
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: Add boost files to export ultra-turbo frequencies 2017-02-03 23:59:41 +01:00
ppc_cbe_cpufreq.c
ppc_cbe_cpufreq.h
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c cpufreq: Remove CPUFREQ_START notifier event 2017-02-04 00:05:30 +01:00
pxa2xx-cpufreq.c
pxa3xx-cpufreq.c
qoriq-cpufreq.c cpufreq: qoriq: enhance bus frequency calculation 2017-03-12 23:10:53 +01:00
s3c24xx-cpufreq-debugfs.c
s3c24xx-cpufreq.c
s3c64xx-cpufreq.c cpufreq: s3c64xx: remove incorrect __init annotation 2016-12-21 02:54:18 +01:00
s3c2410-cpufreq.c
s3c2412-cpufreq.c
s3c2416-cpufreq.c cpufreq: s3c2416: double free on driver init error path 2017-02-09 01:22:45 +01:00
s3c2440-cpufreq.c
s5pv210-cpufreq.c ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
sa1100-cpufreq.c
sa1110-cpufreq.c ARM: sa1100: move StrongARM CPU ID checks to cputype.h 2016-08-23 10:25:17 +01:00
sc520_freq.c
scpi-cpufreq.c cpufreq-SCPI: Delete unnecessary assignment for the field "owner" 2016-08-18 03:42:32 +02:00
sfi-cpufreq.c
sh-cpufreq.c cpufreq/sh: Replace racy task affinity logic 2017-04-15 12:20:55 +02:00
sparc-us2e-cpufreq.c cpufreq/sparc-us2e: Replace racy task affinity logic 2017-04-15 12:20:56 +02:00
sparc-us3-cpufreq.c cpufreq/sparc-us3: Replace racy task affinity logic 2017-04-15 12:20:55 +02:00
spear-cpufreq.c
speedstep-centrino.c
speedstep-ich.c
speedstep-lib.c
speedstep-lib.h
speedstep-smi.c Annotate hardware config module parameters in drivers/cpufreq/ 2017-04-20 12:02:32 +01:00
sti-cpufreq.c scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
tegra20-cpufreq.c
tegra124-cpufreq.c
tegra186-cpufreq.c cpufreq: Add Tegra186 cpufreq driver 2017-04-19 23:23:08 +02:00
ti-cpufreq.c cpufreq: make ti-cpufreq explicitly non-modular 2017-02-16 00:58:52 +01:00
unicore2-cpufreq.c
vexpress-spc-cpufreq.c