• Venkatesh Pallipadi's avatar
    [CPUFREQ] CPU frequency display in /proc/cpuinfo · 95235ca2
    Venkatesh Pallipadi authored
    What is the value shown in "cpu MHz" of /proc/cpuinfo when CPUs are capable of
    changing frequency?
    
    Today the answer is: It depends.
    On i386:
    SMP kernel - It is always the boot frequency
    UP kernel - Scales with the frequency change and shows that was last set.
    
    On x86_64:
    There is one single variable cpu_khz that gets written by all the CPUs. So,
    the frequency set by last CPU will be seen on /proc/cpuinfo of all the
    CPUs in the system. What you see also depends on whether you have constant_tsc
    capable CPU or not.
    
    On ia64:
    It is always boot time frequency of a particular CPU that gets displayed.
    
    The patch below changes this to:
    Show the last known frequency of the particular CPU, when cpufreq is present. If
    cpu doesnot support changing of frequency through cpufreq, then boot frequency
    will be shown. The patch affects i386, x86_64 and ia64 architectures.
    
    Signed-off-by: Venkatesh Pallipadi<venkatesh.pallipadi@intel.com>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    95235ca2
proc.c 4.84 KB