From: Javi Merino <javi.merino@kernel.org>
To: Quentin Perret <quentin.perret@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
peterz@infradead.org, rjw@rjwysocki.net,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, mingo@redhat.com,
morten.rasmussen@arm.com, chris.redpath@arm.com,
patrick.bellasi@arm.com, valentin.schneider@arm.com,
vincent.guittot@linaro.org, thara.gopinath@linaro.org,
viresh.kumar@linaro.org, tkjos@google.com, joelaf@google.com,
smuckle@google.com, adharmap@quicinc.com, skannan@quicinc.com,
pkondeti@codeaurora.org, edubezval@gmail.com,
srinivas.pandruvada@linux.intel.com, currojerez@riseup.net
Subject: Re: [RFC PATCH v3 03/10] PM: Introduce an Energy Model management framework
Date: Fri, 8 Jun 2018 14:39:42 +0100 [thread overview]
Message-ID: <20180608133942.GB4359@tesla> (raw)
In-Reply-To: <20180606162647.GI10870@e108498-lin.cambridge.arm.com>
On Wed, Jun 06, 2018 at 05:26:47PM +0100, Quentin Perret wrote:
> On Wednesday 06 Jun 2018 at 16:29:50 (+0100), Quentin Perret wrote:
> > On Wednesday 06 Jun 2018 at 17:20:00 (+0200), Juri Lelli wrote:
> > > > > This brings me to another question. Let's say there are multiple users of
> > > > > the Energy Model in the system. Shouldn't the units of frequency and power
> > > > > not standardized, maybe Mhz and mW?
> > > > > The task scheduler doesn't care since it is only interested in power diffs
> > > > > but other user might do.
> > > >
> > > > So the good thing about specifying units is that we can probably assume
> > > > ranges on the values. If the power is in mW, assuming that we're talking
> > > > about a single CPU, it'll probably fit in 16 bits. 65W/core should be
> > > > a reasonable upper-bound ?
> > > > But there are also vendors who might not be happy with disclosing absolute
> > > > values ... These are sometimes considered sensitive and only relative
> > > > numbers are discussed publicly. Now, you can also argue that we already
> > > > have units specified in IPA for ex, and that it doesn't really matter if
> > > > a driver "lies" about the real value, as long as the ratios are correct.
> > > > And I guess that anyone can do measurement on the hardware and get those
> > > > values anyway. So specifying a unit (mW) for the power is probably a
> > > > good idea.
> > >
> > > Mmm, I remember we fought quite a bit while getting capacity-dmpis-mhz
> > > binding accepted, and one of the musts was that the values were going to
> > > be normalized. So, normalized power values again maybe?
> >
> > Hmmm, that's a very good point ... There should be no problems on the
> > scheduler side -- we're only interested in correct ratios. But I'm not
> > sure on the thermal side ... I will double check that.
>
> So, IPA needs to compare the power of the CPUs with the power of other
> things (e.g. GPUs). So we can't normalize the power of the CPUs without
> normalizing in the same scale the power of the other devices. I see two
> possibilities:
>
> 1) we don't normalize the CPU power values, we specify them in mW, and
> we document (and maybe throw a warning if we see an issue at runtime)
> the max range of values. The max expected power for a single core
> could be 65K for ex (16bits). And based on that we can verify
> overflow and precision issues in the algorithms, and we keep it easy
> to compare the CPU power numbers with other devices.
>
> 2) we normalize the power values, but that means that the EM framework
> has to manage not only CPUs, but also other types of devices, and
> normalized their power values as well. That's required to keep the
> scale consistent across all of them, and keep comparisons doable.
> But if we do this, we still have to keep a normalized and a "raw"
> version of the power for all devices. And the "raw" power must still
> be in the same unit across all devices, otherwise the re-scaling is
> broken. The main benefit of doing this is that the range of
> acceptable "raw" power values can be larger, probably 32bits, and
> that the precision of the normalized range is arbitrary.
>
> I feel like 2) involves a lot of complexity, and not so many benefits,
> so I'd be happy to go with 1). Unless I forgot something ?
>From the thermal point of view, the power values don't need to have
any given unit, as long as the values are comparable to each other.
Do we need to normalize anything in the kernel though? Can't we just
assume that whatever the platform is telling us is correct? Quentin
mentioned it earlier: sometimes absolute values are considered
sensitive and we only get ones that are correct relative to the rest
of the system.
(This reminds me that the units in
Documentation/thermal/cpu-cooling-api.txt are wrong and I need to fix
it :-X )
Cheers,
Javi
next prev parent reply other threads:[~2018-06-08 13:39 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 14:24 [RFC PATCH v3 00/10] Energy Aware Scheduling Quentin Perret
2018-05-21 14:24 ` [RFC PATCH v3 01/10] sched: Relocate arch_scale_cpu_capacity Quentin Perret
2018-05-21 14:24 ` [RFC PATCH v3 02/10] sched/cpufreq: Factor out utilization to frequency mapping Quentin Perret
2018-05-21 14:24 ` [RFC PATCH v3 03/10] PM: Introduce an Energy Model management framework Quentin Perret
2018-06-06 13:12 ` Dietmar Eggemann
2018-06-06 14:37 ` Quentin Perret
2018-06-06 15:20 ` Juri Lelli
2018-06-06 15:29 ` Quentin Perret
2018-06-06 16:26 ` Quentin Perret
2018-06-07 15:58 ` Dietmar Eggemann
2018-06-08 13:39 ` Javi Merino [this message]
2018-06-08 15:47 ` Quentin Perret
2018-06-09 8:24 ` Javi Merino
2018-06-06 16:47 ` Juri Lelli
2018-06-06 16:59 ` Quentin Perret
2018-06-07 14:44 ` Juri Lelli
2018-06-07 15:19 ` Quentin Perret
2018-06-07 15:55 ` Dietmar Eggemann
2018-06-08 8:25 ` Quentin Perret
2018-06-08 9:36 ` Juri Lelli
2018-06-08 10:31 ` Quentin Perret
2018-06-08 12:39 ` Dietmar Eggemann
2018-06-08 13:11 ` Quentin Perret
2018-06-08 16:39 ` Dietmar Eggemann
2018-06-08 17:02 ` Quentin Perret
2018-06-07 16:04 ` Juri Lelli
2018-06-07 17:31 ` Quentin Perret
2018-06-09 8:13 ` Javi Merino
2018-06-19 11:07 ` Peter Zijlstra
2018-06-19 12:35 ` Quentin Perret
2018-06-19 11:31 ` Peter Zijlstra
2018-06-19 12:40 ` Quentin Perret
2018-06-19 11:34 ` Peter Zijlstra
2018-06-19 12:58 ` Quentin Perret
2018-06-19 13:23 ` Peter Zijlstra
2018-06-19 13:38 ` Quentin Perret
2018-06-19 14:16 ` Peter Zijlstra
2018-06-19 14:21 ` Peter Zijlstra
2018-06-19 14:30 ` Peter Zijlstra
2018-06-19 14:23 ` Quentin Perret
2018-05-21 14:24 ` [RFC PATCH v3 04/10] PM / EM: Expose the Energy Model in sysfs Quentin Perret
2018-06-19 12:16 ` Peter Zijlstra
2018-06-19 13:06 ` Quentin Perret
2018-05-21 14:25 ` [RFC PATCH v3 05/10] sched/topology: Reference the Energy Model of CPUs when available Quentin Perret
2018-06-07 14:44 ` Juri Lelli
2018-06-07 16:02 ` Quentin Perret
2018-06-07 16:29 ` Juri Lelli
2018-06-07 17:26 ` Quentin Perret
2018-06-19 12:26 ` Peter Zijlstra
2018-06-19 13:24 ` Quentin Perret
2018-06-19 16:20 ` Peter Zijlstra
2018-06-19 17:13 ` Quentin Perret
2018-06-19 18:42 ` Peter Zijlstra
2018-06-20 7:58 ` Quentin Perret
2018-05-21 14:25 ` [RFC PATCH v3 06/10] sched: Add over-utilization/tipping point indicator Quentin Perret
2018-06-19 7:01 ` Pavan Kondeti
2018-06-19 10:26 ` Dietmar Eggemann
2018-05-21 14:25 ` [RFC PATCH v3 07/10] sched/fair: Introduce an energy estimation helper function Quentin Perret
2018-06-08 10:30 ` Juri Lelli
2018-06-19 9:51 ` Pavan Kondeti
2018-06-19 9:53 ` Quentin Perret
2018-05-21 14:25 ` [RFC PATCH v3 08/10] sched: Lowest energy aware balancing sched_domain level pointer Quentin Perret
2018-05-21 14:25 ` [RFC PATCH v3 09/10] sched/fair: Select an energy-efficient CPU on task wake-up Quentin Perret
2018-06-08 10:24 ` Juri Lelli
2018-06-08 11:19 ` Quentin Perret
2018-06-08 11:59 ` Juri Lelli
2018-06-08 16:26 ` Quentin Perret
2018-06-19 5:06 ` Pavan Kondeti
2018-06-19 7:57 ` Quentin Perret
2018-06-19 8:41 ` Pavan Kondeti
2018-05-21 14:25 ` [RFC PATCH v3 10/10] arch_topology: Start Energy Aware Scheduling Quentin Perret
2018-06-19 9:18 ` Pavan Kondeti
2018-06-19 9:40 ` Quentin Perret
2018-06-19 9:47 ` Juri Lelli
2018-06-19 10:02 ` Quentin Perret
2018-06-19 10:19 ` Juri Lelli
2018-06-19 10:25 ` Quentin Perret
2018-06-19 10:31 ` Juri Lelli
2018-06-19 10:49 ` Quentin Perret
2018-06-01 9:29 ` [RFC PATCH v3 00/10] " Quentin Perret
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=20180608133942.GB4359@tesla \
--to=javi.merino@kernel.org \
--cc=adharmap@quicinc.com \
--cc=chris.redpath@arm.com \
--cc=currojerez@riseup.net \
--cc=dietmar.eggemann@arm.com \
--cc=edubezval@gmail.com \
--cc=gregkh@linuxfoundation.org \
--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=morten.rasmussen@arm.com \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=pkondeti@codeaurora.org \
--cc=quentin.perret@arm.com \
--cc=rjw@rjwysocki.net \
--cc=skannan@quicinc.com \
--cc=smuckle@google.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=thara.gopinath@linaro.org \
--cc=tkjos@google.com \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox