linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] ARM: configs: sunxi: Set ondemand govenor as default
@ 2018-02-17 14:22 Philipp Rossak
  2018-02-19  8:10 ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Rossak @ 2018-02-17 14:22 UTC (permalink / raw)
  To: linux, maxime.ripard, wens, davem, arnd, mchehab,
	clabbe.montjoie, rask, krzk, sean
  Cc: linux-arm-kernel, linux-kernel, linux-sunxi

Right now the performance govenor is the default frequency govenor on
sunxi devices. This causes some general problems.
When the cpu is idle the cpu runs with its maximum frequency.
This causes a higher cpu temperature in the idle state. When the cpu is
now under load the cpu gets with that higher idle temperature now faster
to its thermal limits.
An other big problem of the performace govenor is the missing
thermal throttling. Some tests with cpuburn resulted in a system crash
when the soc reached its thermal limits since no thermal throttling
occurred.

With this patch we set the default frequency govenor to ondemand mode
and reduce the temperature when the cpu is idle and activate the thermal
throtteling.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/configs/sunxi_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index df433abfcb02..e5812851091c 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMA=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
 CONFIG_CPUFREQ_DT=y
 CONFIG_VFP=y
 CONFIG_NEON=y
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] ARM: configs: sunxi: Set ondemand govenor as default
  2018-02-17 14:22 [RFC PATCH] ARM: configs: sunxi: Set ondemand govenor as default Philipp Rossak
@ 2018-02-19  8:10 ` Maxime Ripard
  2018-02-26 21:29   ` Philipp Rossak
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2018-02-19  8:10 UTC (permalink / raw)
  To: Philipp Rossak
  Cc: linux, wens, davem, arnd, mchehab, clabbe.montjoie, rask, krzk,
	sean, linux-arm-kernel, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

On Sat, Feb 17, 2018 at 03:22:35PM +0100, Philipp Rossak wrote:
> Right now the performance govenor is the default frequency govenor on
> sunxi devices. This causes some general problems.
> When the cpu is idle the cpu runs with its maximum frequency.
> This causes a higher cpu temperature in the idle state. When the cpu is
> now under load the cpu gets with that higher idle temperature now faster
> to its thermal limits.
> An other big problem of the performace govenor is the missing
> thermal throttling. Some tests with cpuburn resulted in a system crash
> when the soc reached its thermal limits since no thermal throttling
> occurred.

This won't change anything with cpuburn. While cpuburn will be
running, ondemand will increase the frequency of the cores to the
maximum frequency, putting yourself in the exact same situation.

The only difference is going to be when you're idle or have a rather
small CPU load. But then, you won't heat much in that case either.

> With this patch we set the default frequency govenor to ondemand mode
> and reduce the temperature when the cpu is idle and activate the thermal
> throtteling.

This patch doesn't activate the thermal throttling.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] ARM: configs: sunxi: Set ondemand govenor as default
  2018-02-19  8:10 ` Maxime Ripard
@ 2018-02-26 21:29   ` Philipp Rossak
  2018-02-27  7:12     ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Rossak @ 2018-02-26 21:29 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux, wens, davem, arnd, mchehab, clabbe.montjoie, rask, krzk,
	sean, linux-arm-kernel, linux-kernel, linux-sunxi



On 19.02.2018 09:10, Maxime Ripard wrote:
> On Sat, Feb 17, 2018 at 03:22:35PM +0100, Philipp Rossak wrote:
>> Right now the performance govenor is the default frequency govenor on
>> sunxi devices. This causes some general problems.
>> When the cpu is idle the cpu runs with its maximum frequency.
>> This causes a higher cpu temperature in the idle state. When the cpu is
>> now under load the cpu gets with that higher idle temperature now faster
>> to its thermal limits.
>> An other big problem of the performace govenor is the missing
>> thermal throttling. Some tests with cpuburn resulted in a system crash
>> when the soc reached its thermal limits since no thermal throttling
>> occurred.
> 
> This won't change anything with cpuburn. While cpuburn will be
> running, ondemand will increase the frequency of the cores to the
> maximum frequency, putting yourself in the exact same situation.
> 
I see here a totally different behavior on the hardware (Bananapi M2, A31s).
First ondemand increases the cpu frequency, when the maximum temperature 
is reached, then it throttles down the cpu step by step to its minimum.
And the cpu doesn't get killed, like with the performance govenor.

I can record some "logs" with RPi-Monitor if this is requiered.

> The only difference is going to be when you're idle or have a rather
> small CPU load. But then, you won't heat much in that case either.
> 
>> With this patch we set the default frequency govenor to ondemand mode
>> and reduce the temperature when the cpu is idle and activate the thermal
>> throtteling.
> 
> This patch doesn't activate the thermal throttling.
> 
> Maxime
> 

Sorry for my late reply!
Philipp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] ARM: configs: sunxi: Set ondemand govenor as default
  2018-02-26 21:29   ` Philipp Rossak
@ 2018-02-27  7:12     ` Maxime Ripard
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2018-02-27  7:12 UTC (permalink / raw)
  To: Philipp Rossak
  Cc: linux, wens, davem, arnd, mchehab, clabbe.montjoie, rask, krzk,
	sean, linux-arm-kernel, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

On Mon, Feb 26, 2018 at 10:29:29PM +0100, Philipp Rossak wrote:
> 
> 
> On 19.02.2018 09:10, Maxime Ripard wrote:
> > On Sat, Feb 17, 2018 at 03:22:35PM +0100, Philipp Rossak wrote:
> > > Right now the performance govenor is the default frequency govenor on
> > > sunxi devices. This causes some general problems.
> > > When the cpu is idle the cpu runs with its maximum frequency.
> > > This causes a higher cpu temperature in the idle state. When the cpu is
> > > now under load the cpu gets with that higher idle temperature now faster
> > > to its thermal limits.
> > > An other big problem of the performace govenor is the missing
> > > thermal throttling. Some tests with cpuburn resulted in a system crash
> > > when the soc reached its thermal limits since no thermal throttling
> > > occurred.
> > 
> > This won't change anything with cpuburn. While cpuburn will be
> > running, ondemand will increase the frequency of the cores to the
> > maximum frequency, putting yourself in the exact same situation.
>
> I see here a totally different behavior on the hardware (Bananapi M2, A31s).
> First ondemand increases the cpu frequency, when the maximum temperature is
> reached, then it throttles down the cpu step by step to its minimum.

This is the thermal throttling, not the cpufreq governor.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-27  7:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-17 14:22 [RFC PATCH] ARM: configs: sunxi: Set ondemand govenor as default Philipp Rossak
2018-02-19  8:10 ` Maxime Ripard
2018-02-26 21:29   ` Philipp Rossak
2018-02-27  7:12     ` Maxime Ripard

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