From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Quentin Perret <quentin.perret@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.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,
javi.merino@kernel.org
Subject: Re: [RFC PATCH v3 03/10] PM: Introduce an Energy Model management framework
Date: Fri, 8 Jun 2018 14:39:33 +0200 [thread overview]
Message-ID: <5a7b8177-7cbe-df90-7d00-8aad0a0f5f08@arm.com> (raw)
In-Reply-To: <20180608082511.GE3597@e108498-lin.cambridge.arm.com>
On 06/08/2018 10:25 AM, Quentin Perret wrote:
> Hi Dietmar,
>
> On Thursday 07 Jun 2018 at 17:55:32 (+0200), Dietmar Eggemann wrote:
>> On 06/07/2018 05:19 PM, Quentin Perret wrote:
>>> Hi Juri,
>>>
>>> On Thursday 07 Jun 2018 at 16:44:09 (+0200), Juri Lelli wrote:
>>>> On 21/05/18 15:24, Quentin Perret wrote:
[...]
> The comment above em_register_freq_domain() explains that, at least
> partially. In the current implementation, if multiple providers register
> the same frequency domain, all but the first will be ignored. The reason
> I implemented this that way is because: 1) it's simple; 2) it should
> cover the current use-cases for EAS and IPA.
>
> But we could do something more clever. We could add a parameter to
> em_register_freq_domain() that would represent some sort of priority. In
> this case, if multiple providers register the same freq domain, the
> higher priority would override the lower priority. For example, power
> values coming from firmware could overwrite power values estimated with
> P=CV^2f for example.
In your current '(3)* Arm/Arm64 init code' (* see at the end of this
email) you have this dev_pm_opp_of_estimate_power() em_data_callback
active_power function.
Let's say thermal and the task scheduler would initialize the EM
independently. They would still end up using C from dt, and f, V and P
from opp library in your example.
IMHO, this information should be only provided once from one source per
platform.
>> The re-scaling thing comes from the requirement that the final cpu capacity
>> values are only known after the arch_topology driver was able to scale the
>> dmipz-capacity-values with the policy->cpuinfo.max_freq but why can't we
>> create the EM on arm/arm64 after this?
>
> What if you don't have dmips-capacity-mhz values in the DT and still
> want to use IPA ? There is no good reason to create a dependency between
> the thermal subsystem and the arch_topology driver IMO.
Mmmmh, that's correct. So it can't be simply called in
init_cpu_capacity_callback() [drivers/base/arch_topology.c] in case the
cpus_to_visit mask is empty. There is this dependency that cpufreq can
be loaded at any time, requiring this re-scaling of capacity values ...
That's not nice ...
>> Even though we would be forced to get cpufreq's related cpumask from
>> somewhere.
>
> That's the easy part. The difficult part is, where do you get power
> values from ? You have to let the lower layers register those values
> in a centralized location on a voluntary basis. And then it becomes easy
> for consumers to access that data, because they know where it is.
The code in the arch could use the same struct em_data_callback em_cb =
{ &dev_pm_opp_of_estimate_power } that the cpufreq driver is currently
using?
>> I guess the easiest model will be that the Energy Model (EM) is fully
>> initialized with one init call (from the arch) and fixed after that.
>
> Again, I don't think that's possible. You have to let the lower layers
> tell you where the power values come from, at the very least. You could
> let the archs do that aggregation I suppose, but I don't really see the
> benefit over one centralized framework with a generic interface ...
> What's your opinion ?
Don't understand the '... let the lower layers tell you where the power
values come from ...' part. Where is the difference whether the arch or
the cpufreq driver uses em_data_callback?
[...]
> So I think I'll drop patch 10/10 for v4 ... That part should be
> discussed separately, with the rest of the Arm-specific changes.
Maybe 3 clearly separated parts of the patch-set; (1) EM (2) EAS uses EM
(3) Arm/Arm64 init code ?
[...]
next prev parent reply other threads:[~2018-06-08 12: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
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 [this message]
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=5a7b8177-7cbe-df90-7d00-8aad0a0f5f08@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=adharmap@quicinc.com \
--cc=chris.redpath@arm.com \
--cc=currojerez@riseup.net \
--cc=edubezval@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=javi.merino@kernel.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
all inboxes | Powered by JetHome®