Skip to contentSkip to conversation

cpufreq 'choice' Kconfig oddness in 2.6.22-rc6-mm1..

DISCUSSION [email protected] 2 participants 3 messages Jul 7, 2007 – Jul 8, 2007

lore
Share & tools
lore
#0 lore raw

So I was looking at drivers/cpufreq/Kconfig, and wondering...

Is there a specific reason why we have a 'choice' clause that allows selecting 'performance' or 'userspace' as the default governor, and no obvious way to select powersave, ondemand, or conservative as a default? Or was this an oversight I should cook up a patch for? Looks like the Kconfig and a bit of cut-n-paste in include/linux/cpufreq.h is all that's needed?

#1 lore raw
Quoted 5 lines · On Sat, Jul 07, 2007 at 12:35:10AM -0400, [email protected] wrote:

So I was looking at drivers/cpufreq/Kconfig, and wondering...

Is there a specific reason why we have a 'choice' clause that allows selecting 'performance' or 'userspace' as the default governor, and no obvious way to select powersave, ondemand, or conservative as a default? Or was this an

Yes, ondemand and conservative may refuse to load/work on systems with a high transition latency and that is sometimes discovered only at runtime. This makes them not selectable as default governors.

Quoted 2 lines

oversight I should cook up a patch for? Looks like the Kconfig and a bit of cut-n-paste in include/linux/cpufreq.h is all that's needed?

No, some more work is needed (e.g.: falling back to a different governor if the selected fails). Thomas Renninger has posted patches on cpufreq-devel to accomplish that.

cheers

Signature · 2 lines
mattia
:wq!
#2 lore raw
Quoted 10 lines · Mattia Dongili
Quoted 5 lines · On Sat, Jul 07, 2007 at 12:35:10AM -0400, [email protected] wrote:

So I was looking at drivers/cpufreq/Kconfig, and wondering...

Is there a specific reason why we have a 'choice' clause that allows selecting 'performance' or 'userspace' as the default governor, and no obvious way to select powersave, ondemand, or conservative as a default? Or was this an

Yes, ondemand and conservative may refuse to load/work on systems with a high transition latency and that is sometimes discovered only at runtime. This makes them not selectable as default governors.

D'Oh! :) I was trying to set ondemand as the default, only after verifying that ondemand works as desired on my laptop. I forgot that we probably need to also allow for people who don't test before making things default....

Quoted 6 lines
Quoted 2 lines

oversight I should cook up a patch for? Looks like the Kconfig and a bit of cut-n-paste in include/linux/cpufreq.h is all that's needed?

No, some more work is needed (e.g.: falling back to a different governor if the selected fails). Thomas Renninger has posted patches on cpufreq-devel to accomplish that.

OK - I'll keep an eye open and test them out whenever they hit -mm. In the meantime, an 'echo ondemand' into the right /sys file is working for me as a workaround.