]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: intel_pstate: Fix up iowait_boost computation
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 11 Mar 2019 11:57:25 +0000 (12:57 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 12 Mar 2019 08:47:30 +0000 (09:47 +0100)
commit1647391a2bc4acf0b2550ca09e089986dd5c7df2
treeb546aa20878e388292f20875c6bdcbb065b5dc41
parenta6ca3c85897684c8f2464a3fe6c346dcdb6581b5
cpufreq: intel_pstate: Fix up iowait_boost computation

After commit 3051bd0a2c62 ("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: 3051bd0a2c62 ("cpufreq: intel_pstate: Rework iowait boosting to be less aggressive")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c