aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-30 17:36:41 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-04-12 21:46:40 -0400
commit39b64aa1c007b98727db9f501266454fa403166c (patch)
treece151f4062839cfad3d306c3c14a38d2a3d3b19c
parent70e493f3bb6bac74112bb4a46bc5ff9342a936a7 (diff)
cpufreq: schedutil: Reduce frequencies slower
The schedutil governor reduces frequencies too fast in some situations which cases undesirable performance drops to appear. To address that issue, make schedutil reduce the frequency slower by setting it to the average of the value chosen during the previous iteration of governor computations and the new one coming from its frequency selection formula. Link: https://bugzilla.kernel.org/show_bug.cgi?id=194963 Reported-by: John <john.ettedgui@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r--kernel/sched/cpufreq_schedutil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 848cb47094cd..b1fedf9932d6 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -101,6 +101,9 @@ static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time,
101 if (sg_policy->next_freq == next_freq) 101 if (sg_policy->next_freq == next_freq)
102 return; 102 return;
103 103
104 if (sg_policy->next_freq > next_freq)
105 next_freq = (sg_policy->next_freq + next_freq) >> 1;
106
104 sg_policy->next_freq = next_freq; 107 sg_policy->next_freq = next_freq;
105 sg_policy->last_freq_update_time = time; 108 sg_policy->last_freq_update_time = time;
106 109