Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1690979
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC v5] cpufreq: schedutil: Make iowait boost more energy efficient |
| Date | 2017-07-19 07:40 +0200 |
| Message-ID | <u4PSh-45S-5@gated-at.bofh.it> (permalink) |
| References | <u3MMO-4zm-13@gated-at.bofh.it> <u49gm-2si-21@gated-at.bofh.it> <u4i9X-82a-13@gated-at.bofh.it> <u4tyq-6Oe-27@gated-at.bofh.it> <u4Bmh-3oI-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 18-07-17, 15:02, Juri Lelli wrote:
> Mmm, seems to make sense to me. :/
>
> Would the following work (on top of Joel's v5)? Rationale being that
> only in sugov_set_iowait_boost we might bump freq up (if no iowait_boost
> was set) or start from policy->min. In sugov_iowait_boost (consumer)
> instead we do the decay (if no boosting was pending).
>
> ---
> kernel/sched/cpufreq_schedutil.c | 29 +++++++++++++++++++----------
> 1 file changed, 19 insertions(+), 10 deletions(-)
>
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index 46b2479641cc..b270563c15a5 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -171,8 +171,14 @@ static void sugov_set_iowait_boost(struct sugov_cpu *sg_cpu, u64 time,
> {
> if (flags & SCHED_CPUFREQ_IOWAIT) {
> sg_cpu->iowait_boost_pending = true;
> - sg_cpu->iowait_boost = max(sg_cpu->iowait_boost,
> - sg_cpu->sg_policy->policy->min);
> + if (sg_cpu->iowait_boost) {
> + /* Bump up 2*current_boost until hitting max */
> + sg_cpu->iowait_boost = max(sg_cpu->iowait_boost << 1,
> + sg_cpu->iowait_boost_max);
And we are back at where we started :)
This wouldn't work because sugov_set_iowait_boost() gets called a lot.
Maybe 10 times within a rate_limit_us period.
The thumb rule is, never double/half the boost from
sugov_set_iowait_boost() :)
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH RFC v5] cpufreq: schedutil: Make iowait boost more energy efficient Juri Lelli <juri.lelli@arm.com> - 2017-07-18 16:10 +0200
Re: [PATCH RFC v5] cpufreq: schedutil: Make iowait boost more energy efficient Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-19 07:40 +0200
Re: [PATCH RFC v5] cpufreq: schedutil: Make iowait boost more energy efficient Joel Fernandes <joelaf@google.com> - 2017-07-19 08:20 +0200
csiph-web