lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 24 Feb 2020 18:39:40 +0100
From:   Ondřej Jirman <megous@...ous.com>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        linux-sunxi@...glegroups.com, Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Maxime Ripard <mripard@...nel.org>,
        Chen-Yu Tsai <wens@...e.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "moderated list:ARM/Allwinner sunXi SoC support" 
        <linux-arm-kernel@...ts.infradead.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ARM: dts: sun8i-a83t: Add thermal trip points/cooling
 maps

On Mon, Feb 24, 2020 at 06:23:28PM +0100, megous hlavni wrote:
> Hi, 
> 
> On Mon, Feb 24, 2020 at 06:06:20PM +0100, Daniel Lezcano wrote:
> > On 24/02/2020 17:54, Ondrej Jirman wrote:
> > > This enables passive cooling by down-regulating CPU voltage
> > >  			clocks = <&ccu CLK_C1CPUX>;
> > > @@ -1188,12 +1188,60 @@ cpu0_thermal: cpu0-thermal {
> > >  			polling-delay-passive = <0>;
> > >  			polling-delay = <0>;
> > >  			thermal-sensors = <&ths 0>;
> > > +
> > > +			trips {
> > > +				cpu0_hot: cpu-hot {
> > > +					temperature = <80000>;
> > > +					hysteresis = <2000>;
> > > +					type = "passive";
> > > +				};
> > > +
> > > +				cpu0_very_hot: cpu-very-hot {
> > > +					temperature = <100000>;
> > > +					hysteresis = <0>;
> > > +					type = "critical";
> > > +				};
> > > +			};
> > > +
> > > +			cooling-maps {
> > > +				cpu-hot-limit {
> > > +					trip = <&cpu0_hot>;
> > > +					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > +							 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > +							 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > +							 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > > +				};
> > > +			};
> > >  		};
> > >  
> > >  		cpu1_thermal: cpu1-thermal {
> > >  			polling-delay-passive = <0>;
> > 
> > No polling to mitigate?
> 
> Polling to mitigate what?
> 
> The driver is using interrupts whenever new reading is available, and
> notifies tz of the change. I don't have a reason to believe any new
> values are available from thermal sensor outside of the interrupt
> period.

To be more clear, new temperatures are available from the thermal sensor driver
at the rate of 4 per second, which should be enough to do quick adjustments to
the thermal zone/cooling device even for quick temperature rises.

https://elixir.bootlin.com/linux/v5.6-rc3/source/drivers/thermal/sun8i_thermal.c#L442

There's no slow/fast period depending on whether the cooling is active.
It's always fast and no polling of the thermal sensor is needed.

regards,
	o.

> > >  			polling-delay = <0>;
> > >  			thermal-sensors = <&ths 1>;
> > > +
> > > +			trips {
> > > +				cpu1_hot: cpu-hot {
> > > +					temperature = <80000>;
> > > +					hysteresis = <2000>;
> > > +					type = "passive";
> > 
> > I'm curious, can you really reach this temperature with a cortex-a7
> > running at 1.2GHz max?
> 
> That depends on ambient temperature. I'd say easily. My A83T is running
> iniside enclosed space with no cooling other than dissipating heat to
> the board.
> 
> Anyway, I'm running my A83T boards at 1.8GHz. And A83T can run up to 2GHz
> at the best SoC bin.
> 
> I'll probably submit updated cpufreq table at some point too, once I fix
> it up to use the SoC bin information.
> 
> https://megous.com/git/linux/commit/?h=ths-5.6&id=171b7c3c3db98b5939d28d0c96b384edda95cec3
> 
> regards,
> 	o.
> 
> > > +				};
> > > +
> > > +				cpu1_very_hot: cpu-very-hot {
> > > +					temperature = <100000>;
> > > +					hysteresis = <0>;
> > > +					type = "critical";
> > > +				};
> > > +			};
> > > +
> > > +			cooling-maps {
> > > +				cpu-hot-limit {
> > > +					trip = <&cpu1_hot>;
> > > +					cooling-device = <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > +							 <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > +							 <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> > > +							 <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> > > +				};
> > > +			};
> > >  		};
> > >  
> > >  		gpu_thermal: gpu-thermal {
> > > 
> > 
> > 
> > -- 
> >  <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

Powered by Openwall GNU/*/Linux Powered by OpenVZ