From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Amit Kucheria <amitk@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Lukasz Luba <lukasz.luba@arm.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Ram Chandrasekar <rkumbako@codeaurora.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH RFC] powercap/drivers/energy_model: protocode: Add powercap energy model based
Date: Fri, 11 Sep 2020 09:58:04 +0200 [thread overview]
Message-ID: <d8338e31-3d9b-a0b4-bf0f-6e74a7ae4fbf@linaro.org> (raw)
In-Reply-To: <CAHLCerPq_f3t=cgS0MXvWuRvPaBrAs2dZEyeNSOyZ3OXHgHNeg@mail.gmail.com>
Hi Amit,
thanks for taking the time to review the series and read this long
description.
On 10/09/2020 11:48, Amit Kucheria wrote:
[ ... ]
>> +
>> +config POWERCAP_EM
>> + bool "Energy model based power capping"
>> + depends on ENERGY_MODEL
>> + default y
>
> Don't make it default ;-)
Thanks for pointing this out :D
[ ... ]
>> + pc_package = powercap_em_register(pct, "package", pc_soc,
>> + &zone_ops, 1, &constraint_ops);
>
> Will the soc and package hierarchy eventually be dynamically read from
> devicetree or similar and these hardcoded registration removed?
Yes, that's correct.
> For the rest of the devices, IMO, it makes sense to use the genpd
> hierarchy to reflect the powercap hierarchy. I whipped up the
> following patch to show how it might be achieved. What needs to be
> done is to now reflect the parent-child/sibling relationships of genpd
> into powercap. Initially I thought we'd need to additional DT
> properties in the genpd bindings but I think we might be able to read
> the device-specific energy model data directly to populate the
> powercap constraints.
We need a way to describe the power constraints relationship of the
domains to populate the hierarchy of the powercap directories.
In the DT it may look like that (very roughly):
power-constraints {
power-constraint: package {
compatible = "power-constraint,virtual";
};
power-constraint: perfdomain0 {
compatible = "power-constraint,cpu";
device = <&cpu_l0>;
parent = <&package>;
};
power-constraint: perfdomain1 {
compatible = "power-constraint,cpu";
device = <&cpu_b0>;
parent = <&package>;
};
power-constraint: gpu {
compatible = "power-constraint,gpu";
parent = <&package>
};
};
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
prev parent reply other threads:[~2020-09-11 7:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 17:14 [PATCH RFC] powercap/drivers/energy_model: protocode: Add powercap energy model based Daniel Lezcano
2020-09-10 9:48 ` Amit Kucheria
2020-09-11 7:58 ` Daniel Lezcano [this message]
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=d8338e31-3d9b-a0b4-bf0f-6e74a7ae4fbf@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rkumbako@codeaurora.org \
--cc=srinivas.pandruvada@linux.intel.com \
/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).