From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Markus Mayer <code@mmayer.net>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: cpuidle and cpufreq coupling?
Date: Thu, 20 Jul 2017 12:48:46 +0530 [thread overview]
Message-ID: <20170720071846.GK352@vireshk-i7> (raw)
In-Reply-To: <CAJZ5v0i2B0=cPB5VxXJUb36LW9hp_L7k-moj+Eg+vPvfPHFcSA@mail.gmail.com>
On 20-07-17, 01:17, Rafael J. Wysocki wrote:
> On Thu, Jul 20, 2017 at 12:54 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> > Hi,
> >
> > We have a particular ARM CPU design that is drawing quite a lot of
> > current upon exit from WFI, and it does so in a way even before the
> > first instruction out of WFI is executed. That means we cannot influence
> > directly the exit from WFI other than by changing the state in which it
> > would be previously entered because of this "dead" time during which the
> > internal logic needs to ramp up back where it left.
> >
> > A naive approach to solving this problem because we have CPU frequency
> > scaling available would be to do the following:
> >
> > - just before entering WFI, switch to a low frequency OPP
> > - enter WFI
> > - upon exit from WFI, ramp up the frequency back to e.g: highest OPP
> >
> > Some of the parts that I am not exactly clear on would be:
> >
> > - would that qualify as a cpuidle governor of some kind that ties in
> > which cpufreq?
> > - would using cpufreq_driver_fast_switch() be an appropriate API to use
> > from outside
>
> Generally, the idle driver is expected to manipulate OPPs as suitable
> for it at the low level.
Does any idle driver do it today ?
I am not sure, but I haven't heard anyone from ARM doing it. Though I
may have completely missed it :)
So, that must call into cpufreq (somehow) and look for a low power
OPP?
@Florian: It would be more tricky then we anticipate. We don't always
want to go to low OPP on idle, as we may get out of it very quickly
and changing OPP twice (before and after idle) in that scenario would
be a complete waste of time. And then I hope your ARM CPUs must be
sharing clock/voltage lines with each other as well ? And in that case
we shouldn't touch the OPP unless the whole cluster is going down, as
some CPUs might be running code then.
--
viresh
next prev parent reply other threads:[~2017-07-20 7:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 22:54 cpuidle and cpufreq coupling? Florian Fainelli
2017-07-19 23:17 ` Rafael J. Wysocki
2017-07-20 7:18 ` Viresh Kumar [this message]
2017-07-20 9:23 ` Sudeep Holla
2017-07-20 23:01 ` Florian Fainelli
2017-07-20 9:52 ` Rafael J. Wysocki
2017-07-20 14:45 ` Peter Zijlstra
2017-07-20 22:56 ` Florian Fainelli
2017-07-21 0:11 ` Vikram Mulukutla
2017-07-21 0:30 ` Florian Fainelli
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=20170720071846.GK352@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=code@mmayer.net \
--cc=daniel.lezcano@linaro.org \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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