Skip to content

Commit 8e3b403

Browse files
committed
cpufreq: intel_pstate: Fix up iowait_boost computation
After commit b8bd158 ("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: b8bd158 ("cpufreq: intel_pstate: Rework iowait boosting to be less aggressive") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 9505b98 commit 8e3b403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,7 @@ static void intel_pstate_update_util(struct update_util_data *data, u64 time,
17621762
/* Start over if the CPU may have been idle. */
17631763
if (delta_ns > TICK_NSEC) {
17641764
cpu->iowait_boost = ONE_EIGHTH_FP;
1765-
} else if (cpu->iowait_boost) {
1765+
} else if (cpu->iowait_boost >= ONE_EIGHTH_FP) {
17661766
cpu->iowait_boost <<= 1;
17671767
if (cpu->iowait_boost > int_tofp(1))
17681768
cpu->iowait_boost = int_tofp(1);

0 commit comments

Comments
 (0)