Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configs: Switch default cpufreq governor to ondemand #6458

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

popcornmix
Copy link
Collaborator

Historically we have booted in powersave mode, and switched to ondemand with the /etc/init.d/raspi-config scipt if the shift key is not pressed.

This was intended to protect users from an unsafe overclock, or inadequate power supply.

But there's little evedence that this option is benefitting anyone, and we can boot faster without it.

Historically we have booted in powersave mode, and switched to ondemand with the
/etc/init.d/raspi-config scipt if the shift key is not pressed.

This was intended to protect users from an unsafe overclock, or inadequate power supply.

But there's little evedence that this option is benefitting anyone,
and we can boot faster without it.

Signed-off-by: Dom Cobley <[email protected]>
@popcornmix
Copy link
Collaborator Author

I have noticed that CONFIG_CPU_FREQ_GOV_PERFORMANCE=y disappears from defconfigs with this commit.
However it is still present in .config, so I think that is just a defconfig curiosity.

@pelwell
Copy link
Contributor

pelwell commented Nov 8, 2024

It is, because the cpufreq Kconfig says:

config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
	bool "performance"
	select CPU_FREQ_GOV_PERFORMANCE
	help
	  Use the CPUFreq governor 'performance' as default. This sets
	  the frequency statically to the highest frequency supported by
	  the CPU.

@popcornmix
Copy link
Collaborator Author

But I didn't enable CPU_FREQ_DEFAULT_GOV_PERFORMANCE - I enabled CPU_FREQ_DEFAULT_GOV_ONDEMAND

But for whatever reason, CPU_FREQ_DEFAULT_GOV_ONDEMAND does select CPU_FREQ_GOV_PERFORMANCE:

config CPU_FREQ_DEFAULT_GOV_ONDEMAND
        bool "ondemand"
        depends on !(X86_INTEL_PSTATE && SMP)
        select CPU_FREQ_GOV_ONDEMAND
        select CPU_FREQ_GOV_PERFORMANCE
        help
          Use the CPUFreq governor 'ondemand' as default. This allows
          you to get a full dynamic frequency capable system by simply
          loading your cpufreq low-level hardware driver.
          Be aware that not all cpufreq drivers support the ondemand
          governor. If unsure have a look at the help section of the
          driver. Fallback governor will be the performance governor.

@pelwell
Copy link
Contributor

pelwell commented Nov 8, 2024

Start again...

Setting the various governors as being the default implies a requirement for that governor, therefore no longer setting POWERSAVE as the default means that POWERSAVE is not automatically enabled. ONDEMAND is slightly different because it isn't available on all platforms, so asking for ONDEMAND to the default also enables PERFORMANCE as a fallback.

@pelwell pelwell merged commit d88807c into raspberrypi:rpi-6.6.y Nov 8, 2024
11 of 12 checks passed
@popcornmix popcornmix deleted the ondemand branch November 8, 2024 15:34
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Nov 8, 2024
See: raspberrypi/linux#6458

kernel: dmaengine: dw-axi-dmac: Allow client-chosen width
See: raspberrypi/linux#6377

kernel: drm/vc4: Allow option to transpose the output on the writeback connector
See: raspberrypi/linux#6312

kernel: raspberrypi/linux#6454
See: raspberrypi/linux#6454

kernel: More dwc3 quirks
See: raspberrypi/linux#6457

kernel: mmc: quirks: add more broken Kingston Canvas Go! SD card date ranges
See: raspberrypi/linux#6447
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Nov 8, 2024
See: raspberrypi/linux#6458

kernel: dmaengine: dw-axi-dmac: Allow client-chosen width
See: raspberrypi/linux#6377

kernel: drm/vc4: Allow option to transpose the output on the writeback connector
See: raspberrypi/linux#6312

kernel: raspberrypi/linux#6454
See: raspberrypi/linux#6454

kernel: More dwc3 quirks
See: raspberrypi/linux#6457

kernel: mmc: quirks: add more broken Kingston Canvas Go! SD card date ranges
See: raspberrypi/linux#6447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants