* [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
@ 2023-10-20 14:20 Carlos Alberto Lopez Perez
2023-10-21 21:38 ` Yann E. MORIN
0 siblings, 1 reply; 13+ messages in thread
From: Carlos Alberto Lopez Perez @ 2023-10-20 14:20 UTC (permalink / raw)
To: buildroot; +Cc: Martin Bark, Julien Grossholtz
* The defconfigs from the RPi Kernel set `powersave` as the default
CPU governor, which is a bad idea as that reduces performance by
setting the CPU frequency to the minimum one.
* In case of a buildroot build user-space is not configured by default
to change the CPU governor, so `powersave` will remain the CPU
governor and it will slow down everything.
* I submitted a fix for those defconfigs to upstream here:
https://github.com/raspberrypi/linux/pull/5666
However, we shouldn't wait until that is accepted and backported
to all the stable branches (if ever is).
* This patch unsets the selection of `powersave` as the default CPU
governor.
* Then the CPU governor that will be selected as default after this
patch will be the Linux's default one that is either `ondemand` or
`schedutil` depending on the Kernel version.
Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
---
board/raspberrypi/default-cpu-governor.fragment | 9 +++++++++
configs/raspberrypi0_defconfig | 1 +
configs/raspberrypi0w_defconfig | 1 +
configs/raspberrypi2_defconfig | 1 +
configs/raspberrypi3_64_defconfig | 1 +
configs/raspberrypi3_defconfig | 1 +
configs/raspberrypi3_qt5we_defconfig | 1 +
configs/raspberrypi4_64_defconfig | 1 +
configs/raspberrypi4_defconfig | 1 +
configs/raspberrypi_defconfig | 1 +
configs/raspberrypicm4io_64_defconfig | 1 +
configs/raspberrypicm4io_defconfig | 1 +
configs/raspberrypizero2w_defconfig | 1 +
13 files changed, 21 insertions(+)
create mode 100644 board/raspberrypi/default-cpu-governor.fragment
diff --git a/board/raspberrypi/default-cpu-governor.fragment b/board/raspberrypi/default-cpu-governor.fragment
new file mode 100644
index 0000000000..e2e201d71d
--- /dev/null
+++ b/board/raspberrypi/default-cpu-governor.fragment
@@ -0,0 +1,9 @@
+# The defconfigs from the RPi Kernel set "powersave" as the default CPU governor.
+# That is a bad idea as it reduces performance, so we unset that default option here.
+# The option to build the powersave governor (but not as the default) is also enabled.
+# A fix for this was sent to upstream: https://github.com/raspberrypi/linux/pull/5666
+# However, we need to carry this option override until those defconfigs are fixed on
+# *all* the kernel branches that we support. So that can be a long time depending
+# on wheter the above PR gets accepted and/or backported to the stable branches.
+CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=n
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
diff --git a/configs/raspberrypi0_defconfig b/configs/raspberrypi0_defconfig
index 4506e94bce..a5a019822d 100644
--- a/configs/raspberrypi0_defconfig
+++ b/configs/raspberrypi0_defconfig
@@ -8,6 +8,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
diff --git a/configs/raspberrypi0w_defconfig b/configs/raspberrypi0w_defconfig
index 7a35794c2d..420cf53f7c 100644
--- a/configs/raspberrypi0w_defconfig
+++ b/configs/raspberrypi0w_defconfig
@@ -8,6 +8,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig
index 9b484c5588..84c7a85393 100644
--- a/configs/raspberrypi2_defconfig
+++ b/configs/raspberrypi2_defconfig
@@ -11,6 +11,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
diff --git a/configs/raspberrypi3_64_defconfig b/configs/raspberrypi3_64_defconfig
index 4d838ae0e8..b67cd5ae90 100644
--- a/configs/raspberrypi3_64_defconfig
+++ b/configs/raspberrypi3_64_defconfig
@@ -10,6 +10,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3"
diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig
index 0a59ab42a9..81995bb67e 100644
--- a/configs/raspberrypi3_defconfig
+++ b/configs/raspberrypi3_defconfig
@@ -10,6 +10,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
diff --git a/configs/raspberrypi3_qt5we_defconfig b/configs/raspberrypi3_qt5we_defconfig
index 40d0c0f888..4040d03066 100644
--- a/configs/raspberrypi3_qt5we_defconfig
+++ b/configs/raspberrypi3_qt5we_defconfig
@@ -11,6 +11,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
diff --git a/configs/raspberrypi4_64_defconfig b/configs/raspberrypi4_64_defconfig
index 5942f7c4e1..fb2a916a4c 100644
--- a/configs/raspberrypi4_64_defconfig
+++ b/configs/raspberrypi4_64_defconfig
@@ -10,6 +10,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
diff --git a/configs/raspberrypi4_defconfig b/configs/raspberrypi4_defconfig
index 4e5580c140..2a2fc2aa21 100644
--- a/configs/raspberrypi4_defconfig
+++ b/configs/raspberrypi4_defconfig
@@ -10,6 +10,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig
index cca53f9b37..55deb343b2 100644
--- a/configs/raspberrypi_defconfig
+++ b/configs/raspberrypi_defconfig
@@ -10,6 +10,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
diff --git a/configs/raspberrypicm4io_64_defconfig b/configs/raspberrypicm4io_64_defconfig
index 29cb0472d7..b4abc9126b 100644
--- a/configs/raspberrypicm4io_64_defconfig
+++ b/configs/raspberrypicm4io_64_defconfig
@@ -10,6 +10,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
diff --git a/configs/raspberrypicm4io_defconfig b/configs/raspberrypicm4io_defconfig
index 017aecc0dd..106ca50609 100644
--- a/configs/raspberrypicm4io_defconfig
+++ b/configs/raspberrypicm4io_defconfig
@@ -10,6 +10,7 @@ BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
diff --git a/configs/raspberrypizero2w_defconfig b/configs/raspberrypizero2w_defconfig
index 2ea503ca24..17e386d4f1 100644
--- a/configs/raspberrypizero2w_defconfig
+++ b/configs/raspberrypizero2w_defconfig
@@ -8,6 +8,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/raspberrypi/default-cpu-governor.fragment"
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-20 14:20 [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor Carlos Alberto Lopez Perez
@ 2023-10-21 21:38 ` Yann E. MORIN
2023-10-23 12:40 ` Marcus Hoffmann via buildroot
0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2023-10-21 21:38 UTC (permalink / raw)
To: Carlos Alberto Lopez Perez; +Cc: Martin Bark, Julien Grossholtz, buildroot
Carlos, All,
On 2023-10-20 15:20 +0100, Carlos Alberto Lopez Perez spake thusly:
> * The defconfigs from the RPi Kernel set `powersave` as the default
> CPU governor, which is a bad idea as that reduces performance by
> setting the CPU frequency to the minimum one.
>
> * In case of a buildroot build user-space is not configured by default
> to change the CPU governor, so `powersave` will remain the CPU
> governor and it will slow down everything.
>
> * I submitted a fix for those defconfigs to upstream here:
> https://github.com/raspberrypi/linux/pull/5666
> However, we shouldn't wait until that is accepted and backported
> to all the stable branches (if ever is).
Unfortunately, the rpi folks have rejected this change:
https://github.com/raspberrypi/linux/pull/5666#issuecomment-1772531097
We're not changing it.
So, as much as I understand the situation, we're are not going to go
counter the upstream decision.
Besides, it is not proper kconfig syntax, see below.
[--SNIP--]
> diff --git a/board/raspberrypi/default-cpu-governor.fragment b/board/raspberrypi/default-cpu-governor.fragment
> new file mode 100644
> index 0000000000..e2e201d71d
> --- /dev/null
> +++ b/board/raspberrypi/default-cpu-governor.fragment
> @@ -0,0 +1,9 @@
> +# The defconfigs from the RPi Kernel set "powersave" as the default CPU governor.
> +# That is a bad idea as it reduces performance, so we unset that default option here.
> +# The option to build the powersave governor (but not as the default) is also enabled.
> +# A fix for this was sent to upstream: https://github.com/raspberrypi/linux/pull/5666
> +# However, we need to carry this option override until those defconfigs are fixed on
> +# *all* the kernel branches that we support. So that can be a long time depending
> +# on wheter the above PR gets accepted and/or backported to the stable branches.
> +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=n
In kconfig, a symbol is never set to 'n'; rather it is not set as a
comment, e.g."
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-21 21:38 ` Yann E. MORIN
@ 2023-10-23 12:40 ` Marcus Hoffmann via buildroot
2023-10-23 16:25 ` Yann E. MORIN
0 siblings, 1 reply; 13+ messages in thread
From: Marcus Hoffmann via buildroot @ 2023-10-23 12:40 UTC (permalink / raw)
To: Yann E. MORIN, Carlos Alberto Lopez Perez
Cc: Martin Bark, Julien Grossholtz, buildroot
Yann, all,
On 21.10.23 23:38, Yann E. MORIN wrote:
> Carlos, All,
>
> On 2023-10-20 15:20 +0100, Carlos Alberto Lopez Perez spake thusly:
>> * The defconfigs from the RPi Kernel set `powersave` as the default
>> CPU governor, which is a bad idea as that reduces performance by
>> setting the CPU frequency to the minimum one.
>>
>> * In case of a buildroot build user-space is not configured by default
>> to change the CPU governor, so `powersave` will remain the CPU
>> governor and it will slow down everything.
>>
>> * I submitted a fix for those defconfigs to upstream here:
>> https://github.com/raspberrypi/linux/pull/5666
>> However, we shouldn't wait until that is accepted and backported
>> to all the stable branches (if ever is).
>
> Unfortunately, the rpi folks have rejected this change:
>
> https://github.com/raspberrypi/linux/pull/5666#issuecomment-1772531097
>
> We're not changing it.
>
> So, as much as I understand the situation, we're are not going to go
> counter the upstream decision.
The upstream situation is that the governor is changed by default to
'ondemand' during boot though, which I don't think the rpi buildroot
defconfigs do?
So while rpi-OS will be running with 'powersave' governor during early
boot (which they have somewhat good reasons for, that I'm not sure apply
to the buildroot project, but well, I'm not going to argue that we
should necessarily deviate here) for buildroot as it currently stands
we'll just be running with 'powersave' governor all the way through,
which is most likely not what anyone wants.
>
> Besides, it is not proper kconfig syntax, see below.
>
> [--SNIP--]
>> diff --git a/board/raspberrypi/default-cpu-governor.fragment b/board/raspberrypi/default-cpu-governor.fragment
>> new file mode 100644
>> index 0000000000..e2e201d71d
>> --- /dev/null
>> +++ b/board/raspberrypi/default-cpu-governor.fragment
>> @@ -0,0 +1,9 @@
>> +# The defconfigs from the RPi Kernel set "powersave" as the default CPU governor.
>> +# That is a bad idea as it reduces performance, so we unset that default option here.
>> +# The option to build the powersave governor (but not as the default) is also enabled.
>> +# A fix for this was sent to upstream: https://github.com/raspberrypi/linux/pull/5666
>> +# However, we need to carry this option override until those defconfigs are fixed on
>> +# *all* the kernel branches that we support. So that can be a long time depending
>> +# on wheter the above PR gets accepted and/or backported to the stable branches.
>> +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=n
>
> In kconfig, a symbol is never set to 'n'; rather it is not set as a
> comment, e.g."
>
> # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
>
> Regards,
> Yann E. MORIN.
>
Best,
Marcus
________________________________
othermo GmbH | Sitz der Gesellschaft: Alzenau | Amtsgericht Aschaffenburg: HRB 14783 | USt-IdNr.: DE319977978 | Geschäftsführung: Dr. Dennis Metz.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-23 12:40 ` Marcus Hoffmann via buildroot
@ 2023-10-23 16:25 ` Yann E. MORIN
2023-10-23 20:23 ` Carlos Alberto Lopez Perez
0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2023-10-23 16:25 UTC (permalink / raw)
To: Marcus Hoffmann
Cc: Carlos Alberto Lopez Perez, Martin Bark, Julien Grossholtz,
buildroot
Marcus, All,
On 2023-10-23 14:40 +0200, Marcus Hoffmann via buildroot spake thusly:
> On 21.10.23 23:38, Yann E. MORIN wrote:
> >Carlos, All,
> >
> >On 2023-10-20 15:20 +0100, Carlos Alberto Lopez Perez spake thusly:
> >>* The defconfigs from the RPi Kernel set `powersave` as the default
> >> CPU governor, which is a bad idea as that reduces performance by
> >> setting the CPU frequency to the minimum one.
> >>
> >>* In case of a buildroot build user-space is not configured by default
> >> to change the CPU governor, so `powersave` will remain the CPU
> >> governor and it will slow down everything.
> >>
> >>* I submitted a fix for those defconfigs to upstream here:
> >> https://github.com/raspberrypi/linux/pull/5666
> >> However, we shouldn't wait until that is accepted and backported
> >> to all the stable branches (if ever is).
> >Unfortunately, the rpi folks have rejected this change:
> > https://github.com/raspberrypi/linux/pull/5666#issuecomment-1772531097
> > We're not changing it.
> The upstream situation is that the governor is changed by default to
> 'ondemand' during boot though, which I don't think the rpi buildroot
> defconfigs do?
The defconfigs are basic configurations that just demonstrate the basic
behaviour of a board, with minimal to no tweaking to deviate from
upstreams.
Users are suposed to take those defconfigs, and adapt to their needs. If
they want to change the governor, then they can provide a startup script
that enables the required governor. Maybe we could cary such a script in
an overlay in board/raspberrypi/, though. Just maybe...
Regards,
Yann E. MORIN.
> So while rpi-OS will be running with 'powersave' governor during early
> boot (which they have somewhat good reasons for, that I'm not sure apply
> to the buildroot project, but well, I'm not going to argue that we
> should necessarily deviate here) for buildroot as it currently stands
> we'll just be running with 'powersave' governor all the way through,
> which is most likely not what anyone wants.
>
> >
> >Besides, it is not proper kconfig syntax, see below.
> >
> >[--SNIP--]
> >>diff --git a/board/raspberrypi/default-cpu-governor.fragment b/board/raspberrypi/default-cpu-governor.fragment
> >>new file mode 100644
> >>index 0000000000..e2e201d71d
> >>--- /dev/null
> >>+++ b/board/raspberrypi/default-cpu-governor.fragment
> >>@@ -0,0 +1,9 @@
> >>+# The defconfigs from the RPi Kernel set "powersave" as the default CPU governor.
> >>+# That is a bad idea as it reduces performance, so we unset that default option here.
> >>+# The option to build the powersave governor (but not as the default) is also enabled.
> >>+# A fix for this was sent to upstream: https://github.com/raspberrypi/linux/pull/5666
> >>+# However, we need to carry this option override until those defconfigs are fixed on
> >>+# *all* the kernel branches that we support. So that can be a long time depending
> >>+# on wheter the above PR gets accepted and/or backported to the stable branches.
> >>+CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=n
> >
> >In kconfig, a symbol is never set to 'n'; rather it is not set as a
> >comment, e.g."
> >
> > # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
> >
> >Regards,
> >Yann E. MORIN.
> >
>
> Best,
> Marcus
> ________________________________
>
> othermo GmbH | Sitz der Gesellschaft: Alzenau | Amtsgericht Aschaffenburg: HRB 14783 | USt-IdNr.: DE319977978 | Geschäftsführung: Dr. Dennis Metz.
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-23 16:25 ` Yann E. MORIN
@ 2023-10-23 20:23 ` Carlos Alberto Lopez Perez
2023-10-24 14:01 ` [Buildroot] [External] - " Vincent Fazio
0 siblings, 1 reply; 13+ messages in thread
From: Carlos Alberto Lopez Perez @ 2023-10-23 20:23 UTC (permalink / raw)
To: Yann E. MORIN, Marcus Hoffmann; +Cc: Martin Bark, Julien Grossholtz, buildroot
On 23/10/2023 18:25, Yann E. MORIN wrote:
> Marcus, All,
>
> On 2023-10-23 14:40 +0200, Marcus Hoffmann via buildroot spake thusly:
>> On 21.10.23 23:38, Yann E. MORIN wrote:
>>> Carlos, All,
>>>
>>> On 2023-10-20 15:20 +0100, Carlos Alberto Lopez Perez spake thusly:
>>>> * The defconfigs from the RPi Kernel set `powersave` as the default
>>>> CPU governor, which is a bad idea as that reduces performance by
>>>> setting the CPU frequency to the minimum one.
>>>>
>>>> * In case of a buildroot build user-space is not configured by default
>>>> to change the CPU governor, so `powersave` will remain the CPU
>>>> governor and it will slow down everything.
>>>>
>>>> * I submitted a fix for those defconfigs to upstream here:
>>>> https://github.com/raspberrypi/linux/pull/5666
>>>> However, we shouldn't wait until that is accepted and backported
>>>> to all the stable branches (if ever is).
>>> Unfortunately, the rpi folks have rejected this change:
>>> https://github.com/raspberrypi/linux/pull/5666#issuecomment-1772531097
>>> We're not changing it.
>> The upstream situation is that the governor is changed by default to
>> 'ondemand' during boot though, which I don't think the rpi buildroot
>> defconfigs do?
>
> The defconfigs are basic configurations that just demonstrate the basic
> behaviour of a board, with minimal to no tweaking to deviate from
> upstreams.
>
> Users are suposed to take those defconfigs, and adapt to their needs. If
> they want to change the governor, then they can provide a startup script
> that enables the required governor. Maybe we could cary such a script in
> an overlay in board/raspberrypi/, though. Just maybe...
>
Who is upstream? mainline Linux or the Linux RPi-OS fork?
Because the default governor for Linux is schedutil and is what any user
would expect to get on their build (IMHO).
The RPi guys are the ones changing the default CPU governor of Linux for
some obscure feature of RPi-OS.
I have argued with them that the place to do this change is not on the
Linux Kernel defconfigs but on their repository for RPi-OS because other
projects (like buildroot) depend on them. But they are not willing to
change this.
So I think Buildroot should undo that change in order to keep the Linux
default CPU governor to the Linux's default one (schedutil)
It is actually a bit surprising to me that we have to argue about this
at all. I thought this change would be uncontroversial. I don't know why
anyone would want to have the powersave governor by default or think
that is a good idea.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-23 20:23 ` Carlos Alberto Lopez Perez
@ 2023-10-24 14:01 ` Vincent Fazio
2023-10-24 14:28 ` Carlos Alberto Lopez Perez
0 siblings, 1 reply; 13+ messages in thread
From: Vincent Fazio @ 2023-10-24 14:01 UTC (permalink / raw)
To: Carlos Alberto Lopez Perez, Yann E. MORIN, Marcus Hoffmann
Cc: Martin Bark, Julien Grossholtz, buildroot@buildroot.org
All,
> -----Original Message-----
> From: buildroot <buildroot-bounces@buildroot.org> On Behalf Of Carlos
> Alberto Lopez Perez
> Sent: Monday, October 23, 2023 3:24 PM
> To: Yann E. MORIN <yann.morin.1998@free.fr>; Marcus Hoffmann
> <marcus.hoffmann@othermo.de>
> Cc: Martin Bark <martin@barkynet.com>; Julien Grossholtz
> <julien.grossholtz@openest.io>; buildroot@buildroot.org
> Subject: [External] - Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop
> setting powersave as the default CPU governor
>
> On 23/10/2023 18:25, Yann E. MORIN wrote:
> > Marcus, All,
> >
> > On 2023-10-23 14:40 +0200, Marcus Hoffmann via buildroot spake thusly:
> >> On 21.10.23 23:38, Yann E. MORIN wrote:
> >>> Carlos, All,
> >>>
> >>> On 2023-10-20 15:20 +0100, Carlos Alberto Lopez Perez spake thusly:
> >>>> * The defconfigs from the RPi Kernel set `powersave` as the default
> >>>> CPU governor, which is a bad idea as that reduces performance by
> >>>> setting the CPU frequency to the minimum one.
> >>>>
> >>>> * In case of a buildroot build user-space is not configured by default
> >>>> to change the CPU governor, so `powersave` will remain the CPU
> >>>> governor and it will slow down everything.
> >>>>
> >>>> * I submitted a fix for those defconfigs to upstream here:
> >>>> https://github.com/raspberrypi/linux/pull/5666
> >>>> However, we shouldn't wait until that is accepted and backported
> >>>> to all the stable branches (if ever is).
> >>> Unfortunately, the rpi folks have rejected this change:
> >>> https://github.com/raspberrypi/linux/pull/5666#issuecomment-
> 1772531097
> >>> We're not changing it.
> >> The upstream situation is that the governor is changed by default to
> >> 'ondemand' during boot though, which I don't think the rpi buildroot
> >> defconfigs do?
> >
> > The defconfigs are basic configurations that just demonstrate the
> > basic behaviour of a board, with minimal to no tweaking to deviate
> > from upstreams.
> >
> > Users are suposed to take those defconfigs, and adapt to their needs.
> > If they want to change the governor, then they can provide a startup
> > script that enables the required governor. Maybe we could cary such a
> > script in an overlay in board/raspberrypi/, though. Just maybe...
> >
>
> Who is upstream? mainline Linux or the Linux RPi-OS fork?
"Upstream" for the in-tree RPi configs is the RPi Linux kernel. The maintainers of that
fork continue to address issues for their suite of products whereas full support has
not, to my knowledge, been completely upstreamed to linux-stable.
>
> Because the default governor for Linux is schedutil and is what any user
> would expect to get on their build (IMHO).
>
> The RPi guys are the ones changing the default CPU governor of Linux for
> some obscure feature of RPi-OS.
>
Per Phil:
We default to powersave to allow boards to be booted successfully when higher clocks speeds are causing problems, e.g. with an inadequate power supply.
I have personally had issues booting CM3+ boards with ondemand governors with ethernet plugged in when the CPUs don't have heat sinks on them.
> I have argued with them that the place to do this change is not on the Linux
> Kernel defconfigs but on their repository for RPi-OS because other projects
> (like buildroot) depend on them. But they are not willing to change this.
>
> So I think Buildroot should undo that change in order to keep the Linux
> default CPU governor to the Linux's default one (schedutil)
>
Can't this be done by one of the following:
1) provide your own kernel defconfig file
2) fork the RPi kernel with your own changes and use that ref
3) add a kconfig fragment to switch the default governor
4) adjust the kernel commandline in config.txt with your chosen governor
5) use a startup script to change governors post boot (obviously doesn't fix the "must boot fast" issue)
> It is actually a bit surprising to me that we have to argue about this at all. I
> thought this change would be uncontroversial. I don't know why anyone
> would want to have the powersave governor by default or think that is a
> good idea.
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you recognize the sender and know the
> content is safe.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-24 14:01 ` [Buildroot] [External] - " Vincent Fazio
@ 2023-10-24 14:28 ` Carlos Alberto Lopez Perez
2023-10-24 14:52 ` Vincent Fazio
0 siblings, 1 reply; 13+ messages in thread
From: Carlos Alberto Lopez Perez @ 2023-10-24 14:28 UTC (permalink / raw)
To: Vincent Fazio, Yann E. MORIN, Marcus Hoffmann
Cc: Martin Bark, Julien Grossholtz, buildroot@buildroot.org
On 24/10/2023 16:01, Vincent Fazio wrote:
> Per Phil:
> We default to powersave to allow boards to be booted successfully when higher clocks speeds are causing problems, e.g. with an inadequate power supply.
>
> I have personally had issues booting CM3+ boards with ondemand governors with ethernet plugged in when the CPUs don't have heat sinks on them.
>
I don't know why the rest of users should inherit a default that is
meant to address a corner case (CM3 boards without heat sinks) and that
slows down everything for them.
What is worse, they likely won't notice they are running with the lowest
possible frequency.
On the other hand, if we default to the Linux default scheduler
(schedutil) then the (minority of) users with overheat problems will
notice something doesn't work as expected (board stops working or the
kernel-log prints errors) so they can change the governor or put a
hetsink if they suspect overheat issues.
>> I have argued with them that the place to do this change is not on the Linux
>> Kernel defconfigs but on their repository for RPi-OS because other projects
>> (like buildroot) depend on them. But they are not willing to change this.
>>
>> So I think Buildroot should undo that change in order to keep the Linux
>> default CPU governor to the Linux's default one (schedutil)
>>
> Can't this be done by one of the following:
> 1) provide your own kernel defconfig file
> 2) fork the RPi kernel with your own changes and use that ref
> 3) add a kconfig fragment to switch the default governor
> 4) adjust the kernel commandline in config.txt with your chosen governor
> 5) use a startup script to change governors post boot (obviously doesn't fix the "must boot fast" issue)
>
Yes, I know how to fix this on my build.
But I'm trying to do a service to the community and change the default
to a more sane option. I'm actually not changing the default, just
resetting it to the default Linux mainline option (undoing the change
that the RPi-OS guys do for their product)
The RPi-OS guys do option 5) for this, so its ok for them to default to
powersave. But Buildroot doesn't have anything like that and I'm not
going to work on it.
The reality nowdays is that all buildroot RPi users are actually running
with powersave governor by default and I bet 90% of them don't know it.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-24 14:28 ` Carlos Alberto Lopez Perez
@ 2023-10-24 14:52 ` Vincent Fazio
2023-10-24 15:00 ` Carlos Alberto Lopez Perez
0 siblings, 1 reply; 13+ messages in thread
From: Vincent Fazio @ 2023-10-24 14:52 UTC (permalink / raw)
To: Carlos Alberto Lopez Perez, Yann E. MORIN, Marcus Hoffmann
Cc: Martin Bark, Julien Grossholtz, buildroot@buildroot.org
All,
> -----Original Message-----
> From: Carlos Alberto Lopez Perez <clopez@igalia.com>
> Sent: Tuesday, October 24, 2023 9:29 AM
> To: Vincent Fazio <vfazio@xes-inc.com>; Yann E. MORIN
> <yann.morin.1998@free.fr>; Marcus Hoffmann
> <marcus.hoffmann@othermo.de>
> Cc: Martin Bark <martin@barkynet.com>; Julien Grossholtz
> <julien.grossholtz@openest.io>; buildroot@buildroot.org
> Subject: Re: [External] - Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*:
> stop setting powersave as the default CPU governor
>
> On 24/10/2023 16:01, Vincent Fazio wrote:
> > Per Phil:
> > We default to powersave to allow boards to be booted successfully when
> higher clocks speeds are causing problems, e.g. with an inadequate power
> supply.
> >
> > I have personally had issues booting CM3+ boards with ondemand
> governors with ethernet plugged in when the CPUs don't have heat sinks on
> them.
> >
>
> I don't know why the rest of users should inherit a default that is meant to
> address a corner case (CM3 boards without heat sinks) and that slows down
> everything for them.
>
RPis can be deployed in numerous ways, such as being seated in custom carrier boards,
so I do agree with upstream when it comes to "playing it safe" and if your situation/design
proves out and isn't flaky, then you can opt-in to a more "aggressive" governor.
I think the problem we can all agree on here, however, and it's a point you made in your
upstream PR, is that it isn't advertised or clear that by default all RPis will be running on
the powersave governor so people don't even know they may want to change it.
> What is worse, they likely won't notice they are running with the lowest
> possible frequency.
>
> On the other hand, if we default to the Linux default scheduler
> (schedutil) then the (minority of) users with overheat problems will notice
> something doesn't work as expected (board stops working or the kernel-log
> prints errors) so they can change the governor or put a hetsink if they
> suspect overheat issues.
>
> >> I have argued with them that the place to do this change is not on
> >> the Linux Kernel defconfigs but on their repository for RPi-OS
> >> because other projects (like buildroot) depend on them. But they are not
> willing to change this.
> >>
> >> So I think Buildroot should undo that change in order to keep the
> >> Linux default CPU governor to the Linux's default one (schedutil)
> >>
> > Can't this be done by one of the following:
> > 1) provide your own kernel defconfig file
> > 2) fork the RPi kernel with your own changes and use that ref
> > 3) add a kconfig fragment to switch the default governor
> > 4) adjust the kernel commandline in config.txt with your chosen
> > governor
> > 5) use a startup script to change governors post boot (obviously
> > doesn't fix the "must boot fast" issue)
> >
>
> Yes, I know how to fix this on my build.
>
> But I'm trying to do a service to the community and change the default to a
> more sane option. I'm actually not changing the default, just resetting it to
> the default Linux mainline option (undoing the change that the RPi-OS guys
> do for their product)
>
It may make sense to update board/raspberrypi/readme.txt to call out that the default governor
for the upstream RPi kernel is powersave and that if users want to change it how they may go about
doing so.
I, personally, see value in the cpu governor kconfig fragment to "revert" to the default linux-stable
governor if consumers want to opt-in so everyone doesn't have to reinvent that wheel.
I obviously defer to the BR maintainers about whether the rpi defconfigs should use it by default.
> The RPi-OS guys do option 5) for this, so its ok for them to default to
> powersave. But Buildroot doesn't have anything like that and I'm not going to
> work on it.
>
> The reality nowdays is that all buildroot RPi users are actually running with
> powersave governor by default and I bet 90% of them don't know it.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-24 14:52 ` Vincent Fazio
@ 2023-10-24 15:00 ` Carlos Alberto Lopez Perez
2023-10-24 15:17 ` Vincent Fazio
0 siblings, 1 reply; 13+ messages in thread
From: Carlos Alberto Lopez Perez @ 2023-10-24 15:00 UTC (permalink / raw)
To: Vincent Fazio, Yann E. MORIN, Marcus Hoffmann
Cc: Martin Bark, Julien Grossholtz, buildroot@buildroot.org
On 24/10/2023 16:52, Vincent Fazio wrote:
> All,
>
>> -----Original Message-----
>> From: Carlos Alberto Lopez Perez <clopez@igalia.com>
>> Sent: Tuesday, October 24, 2023 9:29 AM
>> To: Vincent Fazio <vfazio@xes-inc.com>; Yann E. MORIN
>> <yann.morin.1998@free.fr>; Marcus Hoffmann
>> <marcus.hoffmann@othermo.de>
>> Cc: Martin Bark <martin@barkynet.com>; Julien Grossholtz
>> <julien.grossholtz@openest.io>; buildroot@buildroot.org
>> Subject: Re: [External] - Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*:
>> stop setting powersave as the default CPU governor
>>
>> On 24/10/2023 16:01, Vincent Fazio wrote:
>>> Per Phil:
>>> We default to powersave to allow boards to be booted successfully when
>> higher clocks speeds are causing problems, e.g. with an inadequate power
>> supply.
>>>
>>> I have personally had issues booting CM3+ boards with ondemand
>> governors with ethernet plugged in when the CPUs don't have heat sinks on
>> them.
>>>
>>
>> I don't know why the rest of users should inherit a default that is meant to
>> address a corner case (CM3 boards without heat sinks) and that slows down
>> everything for them.
>>
>
> RPis can be deployed in numerous ways, such as being seated in custom carrier boards,
> so I do agree with upstream when it comes to "playing it safe" and if your situation/design
> proves out and isn't flaky, then you can opt-in to a more "aggressive" governor.
>
That is not true. Upstream RPi-OS defaults to the ondemand governor. The
kernel boots with powersave but there is an init scripy that swichts it
to ondemand as soon as the board boots unless the user press the shift key.
So what is opt-in is to use powersave (the user has to press shift), by
default they run with ondemand governor (ondemand is equivalent to
shedutil, just older)
> I think the problem we can all agree on here, however, and it's a point you made in your
> upstream PR, is that it isn't advertised or clear that by default all RPis will be running on
> the powersave governor so people don't even know they may want to change it.
>
>> What is worse, they likely won't notice they are running with the lowest
>> possible frequency.
>>
>> On the other hand, if we default to the Linux default scheduler
>> (schedutil) then the (minority of) users with overheat problems will notice
>> something doesn't work as expected (board stops working or the kernel-log
>> prints errors) so they can change the governor or put a hetsink if they
>> suspect overheat issues.
>>
>>>> I have argued with them that the place to do this change is not on
>>>> the Linux Kernel defconfigs but on their repository for RPi-OS
>>>> because other projects (like buildroot) depend on them. But they are not
>> willing to change this.
>>>>
>>>> So I think Buildroot should undo that change in order to keep the
>>>> Linux default CPU governor to the Linux's default one (schedutil)
>>>>
>>> Can't this be done by one of the following:
>>> 1) provide your own kernel defconfig file
>>> 2) fork the RPi kernel with your own changes and use that ref
>>> 3) add a kconfig fragment to switch the default governor
>>> 4) adjust the kernel commandline in config.txt with your chosen
>>> governor
>>> 5) use a startup script to change governors post boot (obviously
>>> doesn't fix the "must boot fast" issue)
>>>
>>
>> Yes, I know how to fix this on my build.
>>
>> But I'm trying to do a service to the community and change the default to a
>> more sane option. I'm actually not changing the default, just resetting it to
>> the default Linux mainline option (undoing the change that the RPi-OS guys
>> do for their product)
>>
>
> It may make sense to update board/raspberrypi/readme.txt to call out that the default governor
> for the upstream RPi kernel is powersave and that if users want to change it how they may go about
> doing so.
>
> I, personally, see value in the cpu governor kconfig fragment to "revert" to the default linux-stable
> governor if consumers want to opt-in so everyone doesn't have to reinvent that wheel.
>
> I obviously defer to the BR maintainers about whether the rpi defconfigs should use it by default.
>
I think it should be done the other way. Default to the Linux one
(schedutil/ondemand) and maybe document on the readme that if anyone
wants to use the powersave governor document how to do it.
Please note that RPi-OS also defaults to the ondemand governor by
default. Using powersave is optional (user has to press shift key while
booting the board).
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-24 15:00 ` Carlos Alberto Lopez Perez
@ 2023-10-24 15:17 ` Vincent Fazio
2023-10-24 15:28 ` Carlos Alberto Lopez Perez
0 siblings, 1 reply; 13+ messages in thread
From: Vincent Fazio @ 2023-10-24 15:17 UTC (permalink / raw)
To: Carlos Alberto Lopez Perez, Yann E. MORIN, Marcus Hoffmann
Cc: Martin Bark, Julien Grossholtz, buildroot@buildroot.org
> -----Original Message-----
> From: Carlos Alberto Lopez Perez <clopez@igalia.com>
> Sent: Tuesday, October 24, 2023 10:00 AM
> To: Vincent Fazio <vfazio@xes-inc.com>; Yann E. MORIN
> <yann.morin.1998@free.fr>; Marcus Hoffmann
> <marcus.hoffmann@othermo.de>
> Cc: Martin Bark <martin@barkynet.com>; Julien Grossholtz
> <julien.grossholtz@openest.io>; buildroot@buildroot.org
> Subject: Re: [External] - Re: [Buildroot] [PATCH 1/1] configs/raspberrypi*:
> stop setting powersave as the default CPU governor
>
> On 24/10/2023 16:52, Vincent Fazio wrote:
> > All,
> >
> >
> > RPis can be deployed in numerous ways, such as being seated in custom
> > carrier boards, so I do agree with upstream when it comes to "playing
> > it safe" and if your situation/design proves out and isn't flaky, then you can
> opt-in to a more "aggressive" governor.
> >
>
> That is not true. Upstream RPi-OS defaults to the ondemand governor. The
> kernel boots with powersave but there is an init scripy that swichts it to
> ondemand as soon as the board boots unless the user press the shift key.
>
Sorry, I wasn't very clear here. When I said upstream, I meant "upstream RPi kernel", which default to powersave. RPi-OS does have a mechanism to switch governors post boot.
FWIW, we use vanilla arm64 Debian Bookworm on our RPis and had to tackle this problem too, so I do understand where you're coming from.
Again, I think the biggest issue is just informing users and letting them choose the right solution for their deployment.
> So what is opt-in is to use powersave (the user has to press shift), by default
> they run with ondemand governor (ondemand is equivalent to shedutil, just
> older)
>
>
> > I think the problem we can all agree on here, however, and it's a
> > point you made in your upstream PR, is that it isn't advertised or
> > clear that by default all RPis will be running on the powersave governor so
> people don't even know they may want to change it.
> >
> >
> > It may make sense to update board/raspberrypi/readme.txt to call out
> > that the default governor for the upstream RPi kernel is powersave and
> > that if users want to change it how they may go about doing so.
> >
> > I, personally, see value in the cpu governor kconfig fragment to
> > "revert" to the default linux-stable governor if consumers want to opt-in so
> everyone doesn't have to reinvent that wheel.
> >
> > I obviously defer to the BR maintainers about whether the rpi defconfigs
> should use it by default.
> >
>
> I think it should be done the other way. Default to the Linux one
> (schedutil/ondemand) and maybe document on the readme that if anyone
> wants to use the powersave governor document how to do it.
>
> Please note that RPi-OS also defaults to the ondemand governor by default.
> Using powersave is optional (user has to press shift key while booting the
> board).
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-24 15:17 ` Vincent Fazio
@ 2023-10-24 15:28 ` Carlos Alberto Lopez Perez
2023-10-24 19:07 ` Yann E. MORIN
0 siblings, 1 reply; 13+ messages in thread
From: Carlos Alberto Lopez Perez @ 2023-10-24 15:28 UTC (permalink / raw)
To: Vincent Fazio, Yann E. MORIN, Marcus Hoffmann
Cc: Martin Bark, Julien Grossholtz, buildroot@buildroot.org
On 24/10/2023 17:17, Vincent Fazio wrote:
>> That is not true. Upstream RPi-OS defaults to the ondemand governor. The
>> kernel boots with powersave but there is an init scripy that swichts it to
>> ondemand as soon as the board boots unless the user press the shift key.
>>
>
> Sorry, I wasn't very clear here. When I said upstream, I meant "upstream RPi kernel", which default to powersave. RPi-OS does have a mechanism to switch governors post boot.
>
> FWIW, we use vanilla arm64 Debian Bookworm on our RPis and had to tackle this problem too, so I do understand where you're coming from.
>
> Again, I think the biggest issue is just informing users and letting them choose the right solution for their deployment.
>
I'm all in for informing users and letting them to choose a default.
On the other hand a default selection has to be made for those users
that don't care or don't have time to read the documentation.
And I repeat: RPi-OS defaults to ondemand governor because they change
the governor on boot with an init script.
The governor powersave is only used for the first seconds of the boot
process and is opt-in the rest of the time (the user has to press shit
key meanwhile booting to keep it).
So the current status quo is this one:
1) RPi default CPU governor of mainline Linux kernel: schedutil or
ondemand (depends on the kernel version)
2) RPi default CPU governor of RPi-OS: ondemand (powersave opt-in if
user press shit)
3) RPi default CPU governor of buildroot: powersave
Why buildroot would want to have a default of powersave that not even
matches what RPi-OS does?
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-24 15:28 ` Carlos Alberto Lopez Perez
@ 2023-10-24 19:07 ` Yann E. MORIN
2023-10-24 20:53 ` Carlos Alberto Lopez Perez
0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2023-10-24 19:07 UTC (permalink / raw)
To: Carlos Alberto Lopez Perez
Cc: Martin Bark, buildroot@buildroot.org, Vincent Fazio,
Julien Grossholtz, Marcus Hoffmann
Carlos, All,
Thanks for all the back-n-forth on the subject, I think interested
parties expresed their view, and here's my last take on the topic, see
below...
On 2023-10-24 17:28 +0200, Carlos Alberto Lopez Perez spake thusly:
> On 24/10/2023 17:17, Vincent Fazio wrote:
> >> That is not true. Upstream RPi-OS defaults to the ondemand governor. The
> >> kernel boots with powersave but there is an init scripy that swichts it to
> >> ondemand as soon as the board boots unless the user press the shift key.
> > Sorry, I wasn't very clear here. When I said upstream, I meant
> > "upstream RPi kernel", which default to powersave.
Exactly: the people responsible for maintaing the kernel for the
raspberry pi are the upstream for that kernel. They have decided upon a
default behaviour they want the kernel to have, so this is what we're
following too: it's rpi-upstream's decision to default to powersave.
> > RPi-OS does
> > have a mechanism to switch governors post boot.
RPi-OS is a debian-based distribution using the rpi kernel; they are a
downstream of the rpi kernel, like we are. RPi-OS have done their
integration to switch to using a different behaviour, using a startup
script (or a systemd unit, that's equivalent); they haven't decided to
change the kernel configuration (AFAICS from this thread).
And Buildroot is not RPi-OS.
Besides, some people have started to rely on the fact that a build with
Buildroot will use the powersave governor: Vincent explained a use-case
for which such a default makes sense; on my side I also use (have used)
rpis with powersave because of thermal stability.
> > Again, I think the biggest issue is just informing users and
> > letting them choose the right solution for their deployment.
> I'm all in for informing users and letting them to choose a default.
>
> On the other hand a default selection has to be made for those users
> that don't care or don't have time to read the documentation.
>
> And I repeat: RPi-OS defaults to ondemand governor because they change
> the governor on boot with an init script.
Exactly: they have an init script; they do not change the kernel
configuration.
> The governor powersave is only used for the first seconds of the boot
> process and is opt-in the rest of the time (the user has to press shit
> key meanwhile booting to keep it).
>
> So the current status quo is this one:
>
> 1) RPi default CPU governor of mainline Linux kernel: schedutil or
> ondemand (depends on the kernel version)
> 2) RPi default CPU governor of RPi-OS: ondemand (powersave opt-in if
> user press shit)
> 3) RPi default CPU governor of buildroot: powersave
>
> Why buildroot would want to have a default of powersave that not even
> matches what RPi-OS does?
Because we are *not* RPi-OS. We are not matching against RPi-OS; we are
using rpi-kernel upstream decision.
In another email [0], you wrote;
> The reality nowdays is that all buildroot RPi users are actually running
> with powersave governor by default and I bet 90% of them don't know it.
If they did not notice, then doesn't that mean that the rpi is behaving
good enough for them, and that they in fact do not need the extra speed?
And again, here's a repeat from a previous comment of mine:
The defconfigs are basic configurations that just demonstrate the basic
behaviour of a board, with minimal to no tweaking to deviate from
upstreams. Users are suposed to take those defconfigs, and adapt to
their needs. If they want to change the governor, then they can provide
a startup script that enables the required governor.
[0] https://lore.kernel.org/buildroot/4528d9f7-78ee-1576-37d7-236476d3874f@igalia.com/
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [External] - Re: [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor
2023-10-24 19:07 ` Yann E. MORIN
@ 2023-10-24 20:53 ` Carlos Alberto Lopez Perez
0 siblings, 0 replies; 13+ messages in thread
From: Carlos Alberto Lopez Perez @ 2023-10-24 20:53 UTC (permalink / raw)
To: Yann E. MORIN
Cc: Martin Bark, buildroot@buildroot.org, Vincent Fazio,
Julien Grossholtz, Marcus Hoffmann
On 24/10/2023 21:07, Yann E. MORIN wrote:
> Because we are *not* RPi-OS. We are not matching against RPi-OS; we are
> using rpi-kernel upstream decision.
rpi-kernel upstream decision can't be considered alone. They just do
this because they have an init script that later changes the governor to
ondemand on RPi-OS.
They are not defining those defconfings thinking on other downstreams
than RPi-OS.
I think they are committing a mistake by doing that: the kernel
defconfig is not the right place to set such behaviour. They should be
setting powersave as default from the debian/rules of the kernel package
instead.
And I think you are committing another mistake by taking their
defconfigs as something that should be the default or is thought for
other downstreams than RPi-OS.
It makes *zero* sense to have powersave as default without that init
script that later changes it.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-10-24 20:53 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 14:20 [Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor Carlos Alberto Lopez Perez
2023-10-21 21:38 ` Yann E. MORIN
2023-10-23 12:40 ` Marcus Hoffmann via buildroot
2023-10-23 16:25 ` Yann E. MORIN
2023-10-23 20:23 ` Carlos Alberto Lopez Perez
2023-10-24 14:01 ` [Buildroot] [External] - " Vincent Fazio
2023-10-24 14:28 ` Carlos Alberto Lopez Perez
2023-10-24 14:52 ` Vincent Fazio
2023-10-24 15:00 ` Carlos Alberto Lopez Perez
2023-10-24 15:17 ` Vincent Fazio
2023-10-24 15:28 ` Carlos Alberto Lopez Perez
2023-10-24 19:07 ` Yann E. MORIN
2023-10-24 20:53 ` Carlos Alberto Lopez Perez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.