[PATCH 0/5] thermal: multi-sensor aggregation support

Nicolas Pitre posted 5 patches 1 year, 1 month ago
.../bindings/thermal/thermal-zones.yaml       |   5 +-
arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 210 +-----
drivers/thermal/Kconfig                       |  27 +
drivers/thermal/thermal_core.c                | 643 ++++++++++++++++++
drivers/thermal/thermal_core.h                |  14 +
drivers/thermal/thermal_of.c                  |  86 ++-
6 files changed, 780 insertions(+), 205 deletions(-)
[PATCH 0/5] thermal: multi-sensor aggregation support
Posted by Nicolas Pitre 1 year, 1 month ago
This series provides support for thermal aggregation of multiple sensors.
The "one sensor per zone" model is preserved for all its advantages.
Aggregation is performed via the creation of a special zone whose purpose
consists in aggregating its associated primary zones using a weighted
average.

Motivation for this work stems from use cases where multiple sensors are
contained within the same performance domain. In such case it is preferable
to apply thermal mitigation while considering all such sensors as a whole.

Previous incarnation by Alexandre Bailon can be found here:
https://patchwork.kernel.org/project/linux-pm/cover/20240613132410.161663-1-abailon@baylibre.com/

diffstat:
 .../bindings/thermal/thermal-zones.yaml       |   5 +-
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 210 +-----
 drivers/thermal/Kconfig                       |  27 +
 drivers/thermal/thermal_core.c                | 643 ++++++++++++++++++
 drivers/thermal/thermal_core.h                |  14 +
 drivers/thermal/thermal_of.c                  |  86 ++-
 6 files changed, 780 insertions(+), 205 deletions(-)
Re: [PATCH 0/5] thermal: multi-sensor aggregation support
Posted by Daniel Lezcano 1 year ago
On 12/11/2024 06:19, Nicolas Pitre wrote:
> This series provides support for thermal aggregation of multiple sensors.
> The "one sensor per zone" model is preserved for all its advantages.
> Aggregation is performed via the creation of a special zone whose purpose
> consists in aggregating its associated primary zones using a weighted
> average.
> 
> Motivation for this work stems from use cases where multiple sensors are
> contained within the same performance domain. In such case it is preferable
> to apply thermal mitigation while considering all such sensors as a whole.

Do we have a real use case where we can compare the per sensor vs 
aggregated sensors approach ?



> Previous incarnation by Alexandre Bailon can be found here:
> https://patchwork.kernel.org/project/linux-pm/cover/20240613132410.161663-1-abailon@baylibre.com/
> 
> diffstat:
>   .../bindings/thermal/thermal-zones.yaml       |   5 +-
>   arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 210 +-----
>   drivers/thermal/Kconfig                       |  27 +
>   drivers/thermal/thermal_core.c                | 643 ++++++++++++++++++
>   drivers/thermal/thermal_core.h                |  14 +
>   drivers/thermal/thermal_of.c                  |  86 ++-
>   6 files changed, 780 insertions(+), 205 deletions(-)


-- 
<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
Re: [PATCH 0/5] thermal: multi-sensor aggregation support
Posted by Chen-Yu Tsai 1 year ago
On Sat, Nov 30, 2024 at 4:00 AM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> On 12/11/2024 06:19, Nicolas Pitre wrote:
> > This series provides support for thermal aggregation of multiple sensors.
> > The "one sensor per zone" model is preserved for all its advantages.
> > Aggregation is performed via the creation of a special zone whose purpose
> > consists in aggregating its associated primary zones using a weighted
> > average.
> >
> > Motivation for this work stems from use cases where multiple sensors are
> > contained within the same performance domain. In such case it is preferable
> > to apply thermal mitigation while considering all such sensors as a whole.
>
> Do we have a real use case where we can compare the per sensor vs
> aggregated sensors approach ?

The MediaTek platforms have one sensor per CPU core, but the cores are
grouped into two clusters, and DVFS is tied together for all the cores
in each cluster, as is commonly seen on ARM systems.

Furthermore, there is a hardware block that does minute OPP voltage
tweaking based on thermal readings, and AFAIK that block wants the
per-cluster aggregate temperature.

ChenYu

> > Previous incarnation by Alexandre Bailon can be found here:
> > https://patchwork.kernel.org/project/linux-pm/cover/20240613132410.161663-1-abailon@baylibre.com/
> >
> > diffstat:
> >   .../bindings/thermal/thermal-zones.yaml       |   5 +-
> >   arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 210 +-----
> >   drivers/thermal/Kconfig                       |  27 +
> >   drivers/thermal/thermal_core.c                | 643 ++++++++++++++++++
> >   drivers/thermal/thermal_core.h                |  14 +
> >   drivers/thermal/thermal_of.c                  |  86 ++-
> >   6 files changed, 780 insertions(+), 205 deletions(-)
>
>
> --
> <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
>
Re: [PATCH 0/5] thermal: multi-sensor aggregation support
Posted by Nicolas Pitre 1 year ago
Gentle ping, feedback appreciated.


On Tue, 12 Nov 2024, Nicolas Pitre wrote:

> This series provides support for thermal aggregation of multiple sensors.
> The "one sensor per zone" model is preserved for all its advantages.
> Aggregation is performed via the creation of a special zone whose purpose
> consists in aggregating its associated primary zones using a weighted
> average.
> 
> Motivation for this work stems from use cases where multiple sensors are
> contained within the same performance domain. In such case it is preferable
> to apply thermal mitigation while considering all such sensors as a whole.
> 
> Previous incarnation by Alexandre Bailon can be found here:
> https://patchwork.kernel.org/project/linux-pm/cover/20240613132410.161663-1-abailon@baylibre.com/
> 
> diffstat:
>  .../bindings/thermal/thermal-zones.yaml       |   5 +-
>  arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 210 +-----
>  drivers/thermal/Kconfig                       |  27 +
>  drivers/thermal/thermal_core.c                | 643 ++++++++++++++++++
>  drivers/thermal/thermal_core.h                |  14 +
>  drivers/thermal/thermal_of.c                  |  86 ++-
>  6 files changed, 780 insertions(+), 205 deletions(-)
>
Re: [PATCH 0/5] thermal: multi-sensor aggregation support
Posted by Daniel Lezcano 1 year ago
Hi Nicolas,

On 27/11/2024 23:05, Nicolas Pitre wrote:
> Gentle ping, feedback appreciated.

I'm currently reviewing the series.

We have been discussing this feature since a long time and multiple 
times at different plumbers without any progress since then. So thank 
you for proposing an implementation of this feature.

I have some concerns regarding the approach I will raise tomorrow.

Thanks

   -- Daniel

> On Tue, 12 Nov 2024, Nicolas Pitre wrote:
> 
>> This series provides support for thermal aggregation of multiple sensors.
>> The "one sensor per zone" model is preserved for all its advantages.
>> Aggregation is performed via the creation of a special zone whose purpose
>> consists in aggregating its associated primary zones using a weighted
>> average.
>>
>> Motivation for this work stems from use cases where multiple sensors are
>> contained within the same performance domain. In such case it is preferable
>> to apply thermal mitigation while considering all such sensors as a whole.
>>
>> Previous incarnation by Alexandre Bailon can be found here:
>> https://patchwork.kernel.org/project/linux-pm/cover/20240613132410.161663-1-abailon@baylibre.com/
>>
>> diffstat:
>>   .../bindings/thermal/thermal-zones.yaml       |   5 +-
>>   arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 210 +-----
>>   drivers/thermal/Kconfig                       |  27 +
>>   drivers/thermal/thermal_core.c                | 643 ++++++++++++++++++
>>   drivers/thermal/thermal_core.h                |  14 +
>>   drivers/thermal/thermal_of.c                  |  86 ++-
>>   6 files changed, 780 insertions(+), 205 deletions(-)
>>


-- 
<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