From: Matthias Kaehlcke <mka@chromium.org>
To: Rajendra Nayak <rnayak@codeaurora.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Lukasz Luba <lukasz.luba@arm.com>,
Rob Herring <robh+dt@kernel.org>,
DTML <devicetree@vger.kernel.org>,
Doug Anderson <dianders@chromium.org>,
linux-pm@vger.kernel.org,
Amit Daniel Kachhap <amit.kachhap@gmail.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Javi Merino <javi.merino@kernel.org>
Subject: Re: is 'dynamic-power-coefficient' expected to be based on 'real' power measurements?
Date: Wed, 16 Sep 2020 09:40:55 -0700 [thread overview]
Message-ID: <20200916164055.GH2771744@google.com> (raw)
In-Reply-To: <5553e9c4-9681-e223-8a31-ea0b0582668f@codeaurora.org>
On Wed, Sep 16, 2020 at 09:45:04AM +0530, Rajendra Nayak wrote:
>
> On 9/16/2020 3:06 AM, Matthias Kaehlcke wrote:
> > On Tue, Sep 15, 2020 at 11:23:49PM +0200, Daniel Lezcano wrote:
> > > On 15/09/2020 23:13, Matthias Kaehlcke wrote:
> > > > On Tue, Sep 15, 2020 at 10:55:52PM +0200, Daniel Lezcano wrote:
> > > > > On 15/09/2020 19:58, Matthias Kaehlcke wrote:
> > > > > > On Tue, Sep 15, 2020 at 07:50:10PM +0200, Daniel Lezcano wrote:
> > > > > > > On 15/09/2020 19:24, Matthias Kaehlcke wrote:
> > > > > > > > +Thermal folks
> > > > > > > >
> > > > > > > > Hi Rajendra,
> > > > > > > >
> > > > > > > > On Tue, Sep 15, 2020 at 11:14:00AM +0530, Rajendra Nayak wrote:
> > > > > > > > > Hi Rob,
> > > > > > > > >
> > > > > > > > > There has been some discussions on another thread [1] around the DPC (dynamic-power-coefficient) values
> > > > > > > > > for CPU's being relative vs absolute (based on real power) and should they be used to derive 'real' power
> > > > > > > > > at various OPPs in order to calculate things like 'sustainable-power' for thermal zones.
> > > > > > > > > I believe relative values work perfectly fine for scheduling decisions, but with others using this for
> > > > > > > > > calculating power values in mW, is there a need to document the property as something that *has* to be
> > > > > > > > > based on real power measurements?
> > > > > > > >
> > > > > > > > Relative values may work for scheduling decisions, but not for thermal
> > > > > > > > management with the power allocator, at least not when CPU cooling devices
> > > > > > > > are combined with others that specify their power consumption in absolute
> > > > > > > > values. Such a configuration should be supported IMO.
> > > > > > >
> > > > > > > The energy model is used in the cpufreq cooling device and if the
> > > > > > > sustainable power is consistent with the relative values then there is
> > > > > > > no reason it shouldn't work.
> > > > > >
> > > > > > Agreed on thermal zones that exclusively use CPUs as cooling devices, but
> > > > > > what when you have mixed zones, with CPUs with their pseudo-unit and e.g. a
> > > > > > GPU that specifies its power in mW?
> > > > >
> > > > > Well, if a SoC vendor decides to mix the units, then there is nothing we
> > > > > can do.
> > > > >
> > > > > When specifying the power numbers available for the SoC, they could be
> > > > > all scaled against the highest power number.
> > > >
> > > > The GPU was just one example, a device could have heat dissipating components
> > > > that are not from the SoC vendor (e.g. WiFi, modem, backlight), and depending
> > > > on the design it might not make sense to have separate thermal zones.
> > >
> > > Is it possible to elaborate, I'm not sure to get the point ?
> >
> > A device could have a thermal zone with the following cooling
> > devices:
> >
> > - CPUs with power consumption specified as pmW (pseudo mW
> > - A modem from a third party vendor. The modem can dissipate
> > significant heat and allows to throttle the bandwidth for
> > cooling. The power consumption of the modem is given in
> > mW.
> >
> > These could be crammed together in a small form factor
> > (e.g. ChromeCast or Chromebit) which makes it difficult to
> > discern with a sensor what exactly is generating the heat,
> > which is why you have a single thermal zone.
> >
> > IPA is used as governor for this zone, it can't make accurate
> > decisions because one cooling device specifies it's power
> > consumption in pmW and the other in mW.
>
> Is there a real example upstream for this, or is it a theoretical
> problem (which can exist in the future) we are trying to solve?
Sort of, there is the rk3288-based veyron-mickey, which uses CPUs,
the GPU and ddrfreq as cooling devices in the same zone:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/refs/heads/chromeos-4.19/arch/arm/boot/dts/rk3288-veyron-mickey.dts#42
The device doesn't use IPA though, so mixed up units wouldn't matter in this
case.
From a quick grep in arch/arm(64)/boot/dts/ at least it seems that mixing
cooling devices of different types is not a common case, though it doesn't
necessarily reflect what is done in custom DTs.
next prev parent reply other threads:[~2020-09-16 18:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 5:44 is 'dynamic-power-coefficient' expected to be based on 'real' power measurements? Rajendra Nayak
2020-09-15 17:24 ` Matthias Kaehlcke
2020-09-15 17:50 ` Daniel Lezcano
2020-09-15 17:58 ` Matthias Kaehlcke
2020-09-15 20:55 ` Daniel Lezcano
2020-09-15 21:13 ` Matthias Kaehlcke
2020-09-15 21:23 ` Daniel Lezcano
2020-09-15 21:36 ` Matthias Kaehlcke
2020-09-16 4:15 ` Rajendra Nayak
2020-09-16 16:40 ` Matthias Kaehlcke [this message]
2020-09-15 21:46 ` Doug Anderson
2020-09-15 21:51 ` Matthias Kaehlcke
2020-09-16 9:53 ` Lukasz Luba
2020-09-16 16:48 ` Matthias Kaehlcke
2020-09-24 6:09 ` Rajendra Nayak
2020-09-24 8:21 ` Lukasz Luba
2020-09-16 9:18 ` Lukasz Luba
2020-09-15 19:53 ` Doug Anderson
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=20200916164055.GH2771744@google.com \
--to=mka@chromium.org \
--cc=amit.kachhap@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=javi.merino@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rnayak@codeaurora.org \
--cc=robh+dt@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.