Skip to contentSkip to conversation

ARM: configs: sunxi: Set ondemand govenor as default

RFC PATCH In review Philipp Rossak 2 participants 4 messages Feb 17, 2018 – Feb 27, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ARM: configs: sunxi: Set ondemand govenor as default

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.

---
 arch/arm/configs/sunxi_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/sunxi_defconfig +1 -0
index df433abfcb02..e5812851091c 100644
@@ -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
Signature · 1 line
2.11.0
#1 lore raw
Quoted 10 lines · Philipp Rossak

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.

Quoted 3 lines

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

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180219/94a61b97/attachment.sig>
#2 lore raw
Quoted 12 lines · Maxime Ripard
Quoted 10 lines · Philipp Rossak

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.

Quoted 4 lines

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.

Quoted 11 lines

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.

Quoted 3 lines

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

#3 lore raw
Quoted 15 lines · Philipp Rossak
Quoted 12 lines · Maxime Ripard
Quoted 10 lines · Philipp Rossak

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.

Quoted 7 lines
Quoted 3 lines

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

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180227/1b88cb25/attachment.sig>