• Venki Pallipadi's avatar
    [CPUFREQ] ondemand: fix tickless accounting and software coordination bug · ea487615
    Venki Pallipadi authored
    With tickless kernel and software coordination os P-states, ondemand
    can look at wrong idle statistics. This can happen when ondemand sampling
    is happening on CPU 0 and due to software coordination sampling also looks at
    utilization of CPU 1. If CPU 1 is in tickless state at that moment, its idle
    statistics will not be uptodate and CPU 0 thinks CPU 1 is idle for less
    amount of time than it actually is.
    
    This can be resolved by looking at all the busy times of CPUs, which is
    accurate, even with tickless, and use that to determine idle time in a
    round about way (total time - busy time).
    
    Thanks to Arjan for originally reporting the ondemand bug on
    Lenovo T61.
    Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    ea487615
cpufreq_ondemand.c 16.9 KB