[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d8338e31-3d9b-a0b4-bf0f-6e74a7ae4fbf@linaro.org>
Date: Fri, 11 Sep 2020 09:58:04 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Amit Kucheria <amitk@...nel.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Lukasz Luba <lukasz.luba@....com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Ram Chandrasekar <rkumbako@...eaurora.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH RFC] powercap/drivers/energy_model: protocode: Add
powercap energy model based
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
Powered by blists - more mailing lists