CPU freq scaling

Walter Barnes walter_barnes05 at yahoo.com
Mon Oct 8 20:25:33 PDT 2007


From: Walter Barnes <walter_barnes05 at yahoo.com>

>From: Ken Moffat <ken at linuxfromscratch.org>
>
>>On Sun, Oct 07, 2007 at 05:52:12PM -0700, Walter Barnes wrote:
>>> From: Ken Moffat <ken at linuxfromscratch.org>
>>> 
>>> >Unfortunately, /sys seems to be forever changing - what worked 2
>>> >releases ago might have been renamed by now, so if it _isn't_
>>> >working, try using the different path to ignore_nice_load and see if
>>> >that helps.  ISTR that the logic was reversed at some point, so it
>>> >might not be necessary.
>>> 
>>> Ok, I'll use the new path; however, I'm not up on all the acronyms used in mailing lists so I don't know what ISTR means.
>>> 
>>http://acronyms.thefreedictionary.com/ISTR (only the first two
>>definitions, for any list I've ever been on).
>
>Thanks, I'll bookmark the site as I may need to refer to it often.
>
>>So, you have tested that it isn't working correctly for you ?  My
>>own bootscript has a comment that ignore_nice was for 2.6.12
>>possibly through to 2.6.15 (in other words, definitely not required
>>for 2.6.16).  For me  (on an amd x86_64) ondemand works - if I untar
>>the gcc sources and check /proc/cpuinfo from another term, the speed
>>jumps from 1000 MHz to 2000, stays there, briefly falls back to
>>1800 after untarring finishes, then drops to 1000 again shortly
>>afterwards.
>
>Turns out the docs for freq governors were right under my nose; I found Documentation/cpu-freq/governors.txt in the kernel source yesterday. It explains all the tunables available for both the ondemand and conservative governors. The ignore_nice_load affects how the kernel calculates usage. If set to 1 processes with a nice value are ignored and treated as idle time.
>
>Also, from that document I've been able to modify my cpufreq bootscript to accept 'battery' and 'ac' as arguments. When the script is called with 'battery' the gov is tuned to favor low freq by setting up and down usage thresholds to high values and any change in freq is done in small steps. For 'ac' higher frequencies are prefered and freq changes are done faster. In addition, when on ac the kernel will take longer (take more usage samples) before deciding to lower the freq.
>
>ondemand can be tuned in the same way but there is no tunable for down usage threshold and freq changes are always done fast (I think it actually flip-flops from min to max and back again).
>
>The final step will be installation of apicd to call the script with the right arguments whenever the power source changes.

Oooops! That should be acpid :-D

>>> >Wild guess - the Knoppix kernel is quite a bit older than the LFS
>>> >kernel ?
>>> 
>>> I should have mentioned this in my original post: I'm using Knoppix 5.1.1 released in Jan of this year
>>> and the kernel is a 2.6 series (might be 2.6.19 but not sure - I'm in Windows right now and can't check)
>>> 
>>I'm guessing that the increased restrictions (limit acpi
>>frequencies to what the bios returns) were probably in the 2.6.18 to
>>2.6.20 timeframe.
>
>With the fine tuning of the conservative governor it may not be neccesary to underclock so I will hold off on that for now.
>
>Thanks again for all your help (and the acronym link)
>Walter


       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/



More information about the lfs-support mailing list