[Buildroot] [PATCH 1/1] configs/raspberrypi*: stop setting powersave as the default CPU governor

Yann E. MORIN yann.morin.1998 at free.fr
Mon Oct 23 16:25:06 UTC 2023


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 at 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.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list