summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorSrinivas Pandruvada2017-06-13 01:30:27 +0200
committerRafael J. Wysocki2017-06-24 01:48:12 +0200
commit1a4fe38add8be45eb3873ad756561b9baf6bcaef (patch)
tree155752da5d5b41c954241d91470831920415902f /arch/x86/kernel
parentx86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" (diff)
downloadkernel-qcow2-linux-1a4fe38add8be45eb3873ad756561b9baf6bcaef.tar.gz
kernel-qcow2-linux-1a4fe38add8be45eb3873ad756561b9baf6bcaef.tar.xz
kernel-qcow2-linux-1a4fe38add8be45eb3873ad756561b9baf6bcaef.zip
cpufreq: intel_pstate: Remove max/min fractions to limit performance
In the current model the max/min perf limits are a fraction of current user space limits to the allowed max_freq or 100% for global limits. This results in wrong ratio limits calculation because of rounding issues for some user space limits. Initially we tried to solve this issue by issue by having more shift bits to increase precision. Still there are isolated cases where we still have error. This can be avoided by using ratios all together. Since the way we get cpuinfo.max_freq is by multiplying scaling factor to max ratio, we can easily keep the max/min ratios in terms of ratios and not fractions. For example: if the max ratio = 36 cpuinfo.max_freq = 36 * 100000 = 3600000 Suppose user space sets a limit of 1200000, then we can calculate max ratio limit as = 36 * 1200000 / 3600000 = 12 This will be correct for any user limits. The other advantage is that, we don't need to do any calculation in the fast path as ratio limit is already calculated via set_policy() callback. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/x86/kernel')
0 files changed, 0 insertions, 0 deletions