On Fri, Dec 24, 2010 at 12:24 AM, Steven Haigh <netwiz@xxxxxxxxx> wrote: > On 24/12/2010 4:59 PM, Steven Haigh wrote: >> I've been trying to nut out an issue with cpuspeed on a Fedora14 box... >> >> It seems when cpuspeed is started, it clocks the frequency back to the >> lowest available (350Mhz in my case), and there it stays. >> >> If I do something to create CPU load ( while true; do true; done ) then >> the CPU fails to be clocked back up to max frequency. In fact, no matter >> what I do on that box the CPU doesn't move from 350Mhz... >> >> To get the system back to 2.8Ghz I need to rmmod the p4-clockmod module. >> >> I thought this might have been something silly with the thresholds so I >> set UP_THRESHOLD and DOWN_THRESHOLD manually in /etc/sysconfig/cpuspeed >> - however then when starting cpuspeed I see: >> >> # /etc/init.d/cpuspeed restart >> Disabling performance cpu frequency scaling: [ OK ] >> /etc/init.d/cpuspeed: line 86: >> /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold: No such file >> or directory >> /etc/init.d/cpuspeed: line 86: >> /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold: No such file >> or directory >> Enabling ondemand cpu frequency scaling: [ OK ] >> >> Kernel version is: >> # cat /proc/version >> Linux version 2.6.35.6-45.fc14.i686 >> (mockbuild@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx) (gcc version 4.5.1 20100924 >> (Red Hat 4.5.1-4) (GCC) ) #1 SMP Mon Oct 18 23:56:17 UTC 2010 >> >> Anyone have any ideas on this? :\ >> > > This gets even more interesting! > > # cpufreq-info > cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009 > Report errors and bugs to cpufreq@xxxxxxxxxxxxxxx, please. > analyzing CPU 0: > driver: p4-clockmod > CPUs which run at the same hardware frequency: 0 > CPUs which need to have their frequency coordinated by software: 0 > maximum transition latency: 10.00 ms. > hardware limits: 350 MHz - 2.80 GHz > available frequency steps: 350 MHz, 700 MHz, 1.05 GHz, 1.40 GHz, 1.75 > GHz, 2.10 GHz, 2.45 GHz, 2.80 GHz > available cpufreq governors: ondemand, userspace, performance > current policy: frequency should be within 350 MHz and 2.80 GHz. > The governor "performance" may decide which speed to use > within this range. > current CPU frequency is 2.80 GHz (asserted by call to hardware). > analyzing CPU 1: > driver: p4-clockmod > CPUs which run at the same hardware frequency: 1 > CPUs which need to have their frequency coordinated by software: 1 > maximum transition latency: 10.00 ms. > hardware limits: 350 MHz - 2.80 GHz > available frequency steps: 350 MHz, 700 MHz, 1.05 GHz, 1.40 GHz, 1.75 > GHz, 2.10 GHz, 2.45 GHz, 2.80 GHz > available cpufreq governors: ondemand, userspace, performance > current policy: frequency should be within 350 MHz and 2.80 GHz. > The governor "performance" may decide which speed to use > within this range. > current CPU frequency is 2.80 GHz (asserted by call to hardware). > > Ok, so it thinks its using the performance governor - even though the > config files for cpuspeed say to use ondemand.. > > # cpufreq-set -g ondemand > # echo $? > 0 > > Now it should have set ondemand as the governor. > > # cpufreq-info | grep governor > available cpufreq governors: ondemand, userspace, performance > The governor "performance" may decide which speed to use > available cpufreq governors: ondemand, userspace, performance > The governor "performance" may decide which speed to use > > Interesting. No change at all. I wish I could find the site where I got this information as my recollection of it is a bit hazy but part of your problem may be that the p4-clockmod and ondemand are more or less incompatible. I remember reading something on kerneltrap or something. Basically the latency of changing frequencies are so bad with p4-clockmod that ondemand gives up on it or something like that. I think I could force it to work on my Celeron based EEEPC by manually setting the governor something like this[1]: --- Using Frequency Scaling Governors You can get a list of available governors with (as root): # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors conservative ondemand powersave userspace performance Note: If the governors are compiled as modules, load them first: # modprobe cpufreq_performance cpufreq_ondemand cpufreq_conservative cpufreq_powersave cpufreq_userspace Now we set our governor: What is our current governor? # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor userspace Set new governor and watch if it has changed # echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative Congrats! Your governor is active. You may set the governor in your rc.local, to make it used on every boot. --- Richard [1] http://www.thinkwiki.org/wiki/How_to_make_use_of_Dynamic_Frequency_Scaling -- test mailing list test@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe: https://admin.fedoraproject.org/mailman/listinfo/test