From: Dragan Simic <dsimic@manjaro.org>
To: Alexey Charkov <alchark@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Chen-Yu Tsai <wens@kernel.org>,
Diederik de Haas <didi.debian@cknow.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/6] arm64: dts: rockchip: add thermal zones information on RK3588
Date: Mon, 06 May 2024 14:04:27 +0200 [thread overview]
Message-ID: <908afd900e1e1305abb11496ad3611f3@manjaro.org> (raw)
In-Reply-To: <CABjd4Yz0NyqgJL8HXH2-KCxP-GbsiZjvdwqcQGh6RJuECH=kvw@mail.gmail.com>
On 2024-05-06 12:29, Alexey Charkov wrote:
> On Mon, May 6, 2024 at 1:52 PM Dragan Simic <dsimic@manjaro.org> wrote:
>> Thanks for submitting the v4 of this series! Please, see a couple
>> of my comments below.
>>
>> On 2024-05-06 11:36, Alexey Charkov wrote:
>> > This includes the necessary device tree data to allow thermal
>> > monitoring on RK3588(s) using the on-chip TSADC device, along with
>> > trip points for automatic thermal management.
>> >
>> > Each of the CPU clusters (one for the little cores and two for
>> > the big cores) get a passive cooling trip point at 85C, which
>> > will trigger DVFS throttling of the respective cluster upon
>> > reaching a high temperature condition.
>> >
>> > All zones also have a critical trip point at 115C, which will
>> > trigger a reset.
>> >
>> > Signed-off-by: Alexey Charkov <alchark@gmail.com>
>> > ---
>> > arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 147
>> > ++++++++++++++++++++++++++++++
>> > 1 file changed, 147 insertions(+)
>> >
>> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
>> > b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
>> > index 6ac5ac8b48ab..ef06c1f742e8 100644
>> > --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
>> > +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
>> > @@ -10,6 +10,7 @@
>> > #include <dt-bindings/reset/rockchip,rk3588-cru.h>
>> > #include <dt-bindings/phy/phy.h>
>> > #include <dt-bindings/ata/ahci.h>
>> > +#include <dt-bindings/thermal/thermal.h>
>> >
>> > / {
>> > compatible = "rockchip,rk3588";
>> > @@ -2368,6 +2369,152 @@ pwm15: pwm@febf0030 {
>> > status = "disabled";
>> > };
>> >
>> > + thermal_zones: thermal-zones {
>> > + /* sensor near the center of the SoC */
>> > + package_thermal: package-thermal {
>> > + polling-delay-passive = <0>;
>> > + polling-delay = <0>;
>> > + thermal-sensors = <&tsadc 0>;
>> > +
>> > + trips {
>> > + package_crit: package-crit {
>> > + temperature = <115000>;
>> > + hysteresis = <0>;
>> > + type = "critical";
>> > + };
>> > + };
>> > + };
>> > +
>> > + /* sensor between A76 cores 0 and 1 */
>> > + bigcore0_thermal: bigcore0-thermal {
>> > + polling-delay-passive = <100>;
>> > + polling-delay = <0>;
>> > + thermal-sensors = <&tsadc 1>;
>> > +
>> > + trips {
>> > + bigcore0_alert: bigcore0-alert {
>> > + temperature = <85000>;
>> > + hysteresis = <2000>;
>> > + type = "passive";
>> > + };
>>
>> Doesn't removing the second passive trip, which was present in the v3,
>> result in confusing the IPA governor?
>
> Not really - it will just treat the missing trip as 0C for its initial
> PID calculations [1], and will continually run the governor as opposed
> to putting it to rest when the temperature is below the "switch on"
> value [2].
>
> Getting the power allocation governor to work optimally (i.e. to
> provide tangible benefits over, say, stepwise) is much more involved
> than defining an arbitrary switch-on trip point, as it requires an
> accurate estimate of sustainable power per thermal zone (which we
> don't have for RK3588 in general, and furthermore it must depend a lot
> on a particular cooling setup), and ideally some userspace
> power/thermal model capable of tuning the PID coefficients and
> updating them via sysfs based on how a particular system accumulates
> and dissipates heat under different load.
>
> So after thinking over it for a while I decided that those extra
> passive trips were rather self-deceiving, as they are only useful in
> the context of a power allocation governor but we do not have any of
> the other pieces in place for the power allocation governor to work.
> Better not to clutter the device tree IMO.
I see, thanks for the clarification. Please, give me some time
to thoroughly test your patches, which I'll hopefully be able to
do in the next few days.
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/thermal/gov_power_allocator.c#n156
> [2]
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/thermal/gov_power_allocator.c#n487
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2024-05-06 12:04 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 9:36 [PATCH v4 0/6] RK3588 and Rock 5B dts additions: thermal, OPP and fan Alexey Charkov
2024-05-06 9:36 ` [PATCH v4 1/6] arm64: dts: rockchip: add thermal zones information on RK3588 Alexey Charkov
2024-05-06 9:52 ` Dragan Simic
2024-05-06 10:29 ` Alexey Charkov
2024-05-06 12:04 ` Dragan Simic [this message]
2024-05-06 9:36 ` [PATCH v4 2/6] arm64: dts: rockchip: enable thermal management on all RK3588 boards Alexey Charkov
2024-05-06 12:28 ` Diederik de Haas
2024-05-06 12:52 ` Dragan Simic
2024-05-06 12:54 ` Alexey Charkov
2024-05-08 11:40 ` Anand Moon
2024-05-08 11:46 ` Dragan Simic
2024-05-08 12:30 ` Alexey Charkov
2024-05-08 12:38 ` Dragan Simic
2024-05-08 12:51 ` Anand Moon
2024-05-08 13:21 ` Alexey Charkov
2024-05-09 5:35 ` Anand Moon
2024-05-06 9:36 ` [PATCH v4 3/6] arm64: dts: rockchip: add passive GPU cooling on RK3588 Alexey Charkov
2024-05-06 9:36 ` [PATCH v4 4/6] arm64: dts: rockchip: enable automatic fan control on Rock 5B Alexey Charkov
2024-05-06 9:36 ` [PATCH v4 5/6] arm64: dts: rockchip: Add CPU/memory regulator coupling for RK3588 Alexey Charkov
2024-05-06 9:36 ` [PATCH v4 6/6] arm64: dts: rockchip: Add OPP data for CPU cores on RK3588 Alexey Charkov
2024-05-08 9:12 ` Quentin Schulz
2024-05-08 9:29 ` Dragan Simic
2024-05-08 9:43 ` Alexey Charkov
2024-05-08 10:50 ` Quentin Schulz
2024-05-08 10:56 ` Dragan Simic
2024-05-28 9:49 ` [PATCH v4 0/6] RK3588 and Rock 5B dts additions: thermal, OPP and fan Alexey Charkov
2024-05-28 14:05 ` Dragan Simic
2024-05-28 14:34 ` Heiko Stuebner
2024-05-28 15:01 ` Dragan Simic
2024-05-28 15:16 ` Heiko Stuebner
2024-05-28 15:41 ` Dragan Simic
2024-05-28 16:01 ` Alexey Charkov
[not found] ` <CABjd4YyRJS0AGehuBTDn8ys9uRRkGc0Usme3GX1POq3AQiWTBA@mail.gmail.com>
2024-05-28 16:08 ` Quentin Schulz
2024-05-28 19:26 ` Alexey Charkov
2024-05-29 0:35 ` Dragan Simic
2024-05-29 2:16 ` Dragan Simic
2024-05-29 0:04 ` Dragan Simic
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=908afd900e1e1305abb11496ad3611f3@manjaro.org \
--to=dsimic@manjaro.org \
--cc=alchark@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=didi.debian@cknow.org \
--cc=heiko@sntech.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=wens@kernel.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