aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-03-11 07:57:25 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-03-12 04:47:30 -0400
commit8e3b403954507eb74ad241dc3750443ccc9ee40a (patch)
treeb546aa20878e388292f20875c6bdcbb065b5dc41
parent9505b98ccddc454008ca7efff90044e3e857c827 (diff)
cpufreq: intel_pstate: Fix up iowait_boost computation
After commit b8bd1581aa61 ("cpufreq: intel_pstate: Rework iowait boosting to be less aggressive") the handling of the case when the SCHED_CPUFREQ_IOWAIT flag is set again after a few iterations of intel_pstate_update_util() is a bit inconsistent, because the new value of cpu->iowait_boost may be lower than ONE_EIGHTH_FP if it was set before, but has not dropped down to zero just yet. Fix that up by ensuring that the new value of cpu->iowait_boost will always be at least ONE_EIGHTH_FP then. Fixes: b8bd1581aa61 ("cpufreq: intel_pstate: Rework iowait boosting to be less aggressive") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 002f5169d4eb..e22f0dbaebb1 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1762,7 +1762,7 @@ static void intel_pstate_update_util(struct update_util_data *data, u64 time,
1762 /* Start over if the CPU may have been idle. */ 1762 /* Start over if the CPU may have been idle. */
1763 if (delta_ns > TICK_NSEC) { 1763 if (delta_ns > TICK_NSEC) {
1764 cpu->iowait_boost = ONE_EIGHTH_FP; 1764 cpu->iowait_boost = ONE_EIGHTH_FP;
1765 } else if (cpu->iowait_boost) { 1765 } else if (cpu->iowait_boost >= ONE_EIGHTH_FP) {
1766 cpu->iowait_boost <<= 1; 1766 cpu->iowait_boost <<= 1;
1767 if (cpu->iowait_boost > int_tofp(1)) 1767 if (cpu->iowait_boost > int_tofp(1))
1768 cpu->iowait_boost = int_tofp(1); 1768 cpu->iowait_boost = int_tofp(1);