/proc/sys/cpu interface and elanfreq on linux 2.4.20
Hello,
I applied a cpufreq patch (http://www.codemonkey.org.uk/projects\
/cpufreq/cpufreq-2.4.21-2.gz) to a linux 2.4.20 tree without any problems, and compiled with the following (default) settings for an AMD Elan cpu:
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_PROC_INTF=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_24_API=y
CONFIG_ELAN_CPUFREQ=mThe just created module `elanfreq.o' has been loaded smoothly into the kernel, and in /proc/cpufreq I can see
minimum CPU frequency - maximum CPU frequency - policy CPU 0 1000 kHz ( 1 %) - 66000 kHz (100 %) - performance
But I wonder about why both /proc/sys/cpu/0/speed-min and -max contain zero, and speed' always shows the maximum frequency. If I echo a value out of the list in elanfreq.c into speed', there is no reaction, elanfreq_target() will not be called (with one exception:
When initializing, the value specified by `max_freq' will be set twice via elanfreq_target).
Am I missing something, does perhaps "deprecated interfaces" mean, the userspace access via /proc/sys/cpu might not work?
Signature · 1 line
Michael Teichgräber
Quoted 7 lines · Michael Teichgräber
Am I missing something, does perhaps "deprecated interfaces" mean, the userspace access via
/proc/sys/cpumight not work?
According to /usr/src/linux/Documentation/cpufreq/user-guide.txt :
"These are files (/proc/sys/cpu/0/* ) for deprecated interfaces to cpufreq, which offer far less functionality."
Many functionality are missing (have a look on user-guide for more details) but the userspace stuff works. In fact you just forgot to activate it. To do so (you must be root):
$ echo -n "0%0%100%userspace" > /proc/cpufreq
and then you should have
$ cat /proc/sys/cpu/0/* 66000 66000 1000
Now you can echo the frequency you want in /proc/sys/cpu/0/speed ! Enjoy !!!
Mike
Quoted 2 lines · Toula Michael
In fact you just forgot to activate it. To do so (you must be root):
$ echo -n "0%0%100%userspace" > /proc/cpufreq
Thanks, this made it work.
Signature · 1 line
Michael