summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2017-06-13 02:30:27 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-24 02:48:12 +0300
commit1a4fe38add8be45eb3873ad756561b9baf6bcaef (patch)
tree155752da5d5b41c954241d91470831920415902f /arch/x86
parent51204e0639c49ada02fd823782ad673b6326d748 (diff)
downloadlinux-1a4fe38add8be45eb3873ad756561b9baf6bcaef.tar.xz
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')
0 files changed, 0 insertions, 0 deletions