Skip to content

Commit

Permalink
configs: stop defaulting to the powersave governor
Browse files Browse the repository at this point in the history
* The default configs for the RPi shouldn't be defaulting to the
  powersave governor because it reduces the performance by setting
  the frequency to the minimum.

* This is an issue even if user-space changes the governor later
  because it is slowing down the boot time (the kernel will boot
  with the minimum CPU frequency until user-space fixes it)

* It is also a major issue for another projects than RaspberryPiOS
  that rely on this kernel and use this configs as base or default.
  For example: I have been bitten by this issue when using Yocto
  with meta-raspberrypi because their kernel config is based on this
  ones, so it will boot with powersave by default and there user
  space is not configured to change the governor. So it will remain
  with powersave always :(

* Just don't set any default governor and let the Linux's defaults
  apply: which means selecting governor `schedutil` in this kernel
  version, but it was governor `ondemand` on older versions and on
  the future it can be a newer scheduler. See the logic to select
  the default at the file `drivers/cpufreq/Kconfig`.

* Enable also the config option to ensure that the `powersave`
  governor is built and available if user space wants to use it.

* For config bcmrpi_defconfig enable also the `schedutil` governor,
  which is the only config missing to enable this one.

Signed-off-by: Carlos Alberto Lopez Perez <[email protected]>
  • Loading branch information
clopez committed Oct 20, 2023
1 parent 2e87f33 commit ffba47a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
CONFIG_CPUFREQ_DT=y
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
CONFIG_VFP=y
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ CONFIG_PM_DEBUG=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/configs/bcm2712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CONFIG_PM_DEBUG=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/configs/bcmrpi3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CONFIG_PM=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
Expand Down

0 comments on commit ffba47a

Please sign in to comment.