# CPUFreq governor UserSpace

## aCOSwt

Hello,

When having chosen userspace as cpufreq governor, I understand that I can manually request what I wish or let some userspace daemon do the work.

Related to this :

0/ As long as no frequency scaling daemon runs or no value is manually forced, what is the initial value given by the governor at system startup ?

1/ What is kondemand ?

- Is it the KDE daemon dedicated to the frequency scaling ?

- Does it fit with the kernel userspace cpufreq governor ?

- Is kondemand configurable ?

(I ask this because I have googled in vain for informations about kondemand and as I run (voluntarily) no frequency scaling daemon but I can see the frequency of my cpus mooving, I just suspect.

2/ Which frequency scaling daemon do you advise me to run on top of the userspace governor, knowing that I am looking for the lowest possible latency.

3/ In case of yes to 1/ and a different answer to 2/, how is it possible to commute ?Last edited by aCOSwt on Fri Jul 16, 2010 7:48 am; edited 4 times in total

----------

## paulusbrand

0: You can set your default governor in de kernel configuration

1: *Quote:*   

>  kondemand is a kernel thread that belongs to the ondemand governor of cpufreq subsystem, which changes the p-states of the system, based on the utilization statistics. Thus it’s something that helps in power management.

 

2:Since you selected userspace i think the userspace is always on top. I use ondemand for default value in kernel configuration and the gnome panel to sometimes overrule it.

----------

## aCOSwt

Thank you paulusbrand for your answer.

I am anyhow even more puzzled.

0 : Yes, I understand this. My question was about the initial cpufreq value given to the governor at system startup.

1 : Well then, how can I get a kernel thread belonging to the ondemand governor running when I configure my kernel to use the userspace governor ?

What program / script would change this behind my back from system startup ?

2 : You said using the ondemand as default. I understand that it is not fantastic with regard to latency. Is there some combination frequency scaling daemon / userspace governor with which I could expect a lower latency.

----------

## paulusbrand

0: I don't have any cpu scaling enabled on my server. Still there is a kondemand thread per core. I guess there will be a kondemand process even if the ondemand governor is not enabled. 

Try cpufrequtils to determen the current governor. Or "cat /sys/devices/system/cpu/cpu#/cpufreq/scaling_governor".

1:See 0: the thread is there even if ondemand isn't selected.

2:Can't say. Kernel ondemand works fine for me.

----------

## maltinator

0: To my understanding "userspace" just takes the last value. So it would depend on your BIOS settings and this is most likely (for a non mobile system) the highest frequency

and as paulusbrand already said you can use the cpufrequtils (cpufreq-info even gives per Core statistics!)

1: 

2: Ondemand works with polling. So it checks periodically if the freq. should be altered. there are ways to change the sampling_rate see Documentation/cpu-freq/governors.txt if you are not satisfied with the behaviour of ondemand. A Userpace tool for dynamic freq. setting would make things worse i guess.

malte

----------

