CPUFREQ: ondemand: fix tickless accounting and software coordination bug
commit42418d94efa05105ba5a467119d3864201425430
authorVenki Pallipadi <venkatesh.pallipadi@intel.com>
Wed, 20 Jun 2007 21:26:24 +0000 (20 14:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 15 Aug 2007 16:25:10 +0000 (15 09:25 -0700)
tree22462853523d272c772fb14d6387e83ff1581f2e
parentfd2efeae63567dde934bb54772bb1b991275b04a
CPUFREQ: ondemand: fix tickless accounting and software coordination bug

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: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/cpufreq/cpufreq_ondemand.c