From: Viresh Kumar <viresh.kumar@linaro.org>
To: Joel Fernandes <joelaf@google.com>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linaro-kernel@lists.linaro.org,
Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Juri Lelli <Juri.Lelli@arm.com>,
Patrick Bellasi <patrick.bellasi@arm.com>,
John Ettedgui <john.ettedgui@gmail.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while reducing frequency
Date: Mon, 12 Jun 2017 09:14:20 +0530 [thread overview]
Message-ID: <20170612034420.GD5297@vireshk-i7> (raw)
In-Reply-To: <CAJWu+oomeeyCaz_zXQRGgz+yB59AANnrMLtXV8Lu+n=UvMhkcA@mail.gmail.com>
On 10-06-17, 23:21, Joel Fernandes wrote:
> On Sat, Jun 10, 2017 at 2:11 AM, Joel Fernandes <joelaf@google.com> wrote:
> > On Fri, Jun 9, 2017 at 3:15 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >> While reducing frequency if there are no frequencies available between
> >> "current" and "next" calculated frequency, then the core will never
> >> select the "next" frequency.
> >>
> >> For example, consider the possible range of frequencies as 900 MHz, 1
> >> GHz, 1.1 GHz, and 1.2 GHz. If the current frequency is 1.1 GHz and the
> >> next frequency (based on current utilization) is 1 GHz, then the
> >> schedutil governor will try to set the average of these as the next
> >> frequency (i.e. 1.05 GHz).
> >>
> >> Because we always try to find the lowest frequency greater than equal to
> >> the target frequency, cpufreq_driver_resolve_freq() will end up
> >> returning 1.1 GHz only. And we will not be able to reduce the frequency
> >> eventually. The worst hit is the policy->min frequency as that will
> >> never get selected after the frequency is increased once.
> >
> > But once utilization goes to 0, it will select the min frequency
> > (because it selects lowest frequency >= target)?
>
> Never mind my comment about util 0, I see the problem you mention.
> However I feel that this entire series adds complexity all to handle
> the case of a false cache-miss which I think might not be that bad,
> and the tradeoff with complexity/readability of the code kind of
> negates the benefit. That's just my opinion about it fwiw.
Right and that's why I said in the cover letter that we may want to revert the
offending commit for the time being as the solutions provided here have too much
dependency on the resolve_freq() callback.
--
viresh
next prev parent reply other threads:[~2017-06-12 3:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 10:15 [PATCH 0/3] cpufreq: schedutil: Fix 4.12 regressions Viresh Kumar
2017-06-09 10:15 ` [PATCH 1/3] cpufreq: schedutil: Restore cached_raw_freq behavior Viresh Kumar
2017-06-09 10:15 ` [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while reducing frequency Viresh Kumar
2017-06-10 9:11 ` Joel Fernandes
2017-06-11 6:21 ` Joel Fernandes
2017-06-12 3:44 ` Viresh Kumar [this message]
2017-06-12 12:33 ` Rafael J. Wysocki
2017-06-09 10:15 ` [PATCH 3/3] cpufreq: intel_pstate: Provide resolve_freq() to fix regression Viresh Kumar
2017-06-10 9:26 ` Joel Fernandes
2017-06-12 3:41 ` Viresh Kumar
2017-06-09 12:24 ` [PATCH 0/3] cpufreq: schedutil: Fix 4.12 regressions Rafael J. Wysocki
2017-06-09 12:32 ` Viresh Kumar
2017-06-09 13:25 ` Rafael J. Wysocki
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=20170612034420.GD5297@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=Juri.Lelli@arm.com \
--cc=joelaf@google.com \
--cc=john.ettedgui@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=vincent.guittot@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;
as well as URLs for NNTP newsgroup(s).