]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cpufreq: intel_pstate: round up min_perf limits
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 22 Nov 2016 00:33:19 +0000 (16:33 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Nov 2016 01:31:48 +0000 (02:31 +0100)
commit46992d6b55b558ac4128c1f846de3cfddfa7cf7c
treeb9aac54db57286dab66268478fa652212f41374d
parent30248feff5e5c6a01ade5e6126009e296ed8bd35
cpufreq: intel_pstate: round up min_perf limits

In some use cases, user wants to enforce a minimum performance limit on
CPUs. But because of simple division the resultant performance is 100 MHz
less than the desired in some cases.

For example when the maximum frequency is 3.50 GHz, setting
scaling_min_frequency to 1.6 GHz always results in 1.5 GHz minimum. With
simple round up, the frequency can be set to 1.6 GHz to minimum in this
case. This round up is already done to max_policy_pct and max_perf, so do
the same for min_policy_pct and min_perf.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c