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

Carlos Alberto Lopez Perez clopez at igalia.com
Tue Oct 24 15:00:25 UTC 2023


On 24/10/2023 16:52, Vincent Fazio wrote:
> All,
> 
>> -----Original Message-----
>> From: Carlos Alberto Lopez Perez <clopez at igalia.com>
>> Sent: Tuesday, October 24, 2023 9:29 AM
>> To: Vincent Fazio <vfazio at xes-inc.com>; Yann E. MORIN
>> <yann.morin.1998 at free.fr>; Marcus Hoffmann
>> <marcus.hoffmann at othermo.de>
>> Cc: Martin Bark <martin at barkynet.com>; Julien Grossholtz
>> <julien.grossholtz at openest.io>; buildroot at 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).




More information about the buildroot mailing list