From: Peter Zijlstra <peterz@infradead.org>
To: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Joel Fernandes <joelaf@google.com>,
Steve Muckle <smuckle@google.com>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>
Subject: Re: [PATCH v2] cpufreq/schedutil: Cleanup, document and fix iowait boost
Date: Tue, 10 Apr 2018 21:37:08 +0200 [thread overview]
Message-ID: <20180410193708.GE4043@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180410155931.31973-1-patrick.bellasi@arm.com>
On Tue, Apr 10, 2018 at 04:59:31PM +0100, Patrick Bellasi wrote:
> The iowait boosting code has been recently updated to add a progressive
> boosting behavior which allows to be less aggressive in boosting tasks
> doing only sporadic IO operations, thus being more energy efficient for
> example on mobile platforms.
>
> The current code is now however a bit convoluted. Some functionalities
> (e.g. iowait boost reset) are replicated in different paths and their
> documentation is slightly misaligned.
While your patch does seem to improve things, it still has duplicated
bits in. Eg. the TICK_NSEC clearing exists in both functions.
> - sugov_set_iowait_boost: is now in charge only to set/increase the IO
> wait boost, every time a task wakes up from an IO wait.
>
> - sugov_iowait_boost: is now in charge to reset/reduce the IO wait
> boost, every time a sugov update is triggered, as well as
> to (eventually) enforce the currently required IO boost value.
I'm not sold on those function names; feels like we can do better,
although I'm struggling to come up with anything sensible just now.
>
> if (delta_ns > TICK_NSEC) {
> + sg_cpu->iowait_boost = iowait
> + ? sg_cpu->sg_policy->policy->min : 0;
> + sg_cpu->iowait_boost_pending = iowait;
> + return;
> }
> + if (delta_ns > TICK_NSEC) {
> + sg_cpu->iowait_boost = 0;
> + sg_cpu->iowait_boost_pending = false;
> + return;
> + }
Looks like something we can maybe put in a helper or something.
next prev parent reply other threads:[~2018-04-10 19:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 15:59 [PATCH v2] cpufreq/schedutil: Cleanup, document and fix iowait boost Patrick Bellasi
2018-04-10 19:37 ` Peter Zijlstra [this message]
[not found] ` <20180411104445.GM14248@e110439-lin>
2018-04-11 10:58 ` Peter Zijlstra
2018-04-11 14:39 ` Patrick Bellasi
2018-04-11 14:54 ` Viresh Kumar
[not found] ` <20180411043726.GJ7671@vireshk-i7>
[not found] ` <20180411104824.GN14248@e110439-lin>
2018-04-11 14:44 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180410193708.GE4043@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=dietmar.eggemann@arm.com \
--cc=joelaf@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@arm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=smuckle@google.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox