linux/drivers/cpufreq
Dave Jones df8b59be09 [CPUFREQ] Avoid the ondemand cpufreq governor to use a too high frequency for stats.
The problem is in the ondemand governor, there is a periodic measurement
of the CPU usage. This CPU usage is updated by the scheduler after every
tick (basically, by adding 1 either to "idle" or to "user" or to
"system"). So if the frequency of the governor is too high, the stat
will be meaningless (as mostly no number have changed).

So this patch checks that the measurements are separated by at least 10
ticks. It means that by default, stats will have about 5% error (20
ticks). Of course those numbers can be argued but, IMHO, they look sane.
The patch also includes a small clean-up to check more explictly the
result of the conversion from ns to µs being null.

Let's note that (on x86) this has never been really needed before 2.6.13
because HZ was always 1000. Now that HZ can be 100, some CPU might be
affected by this problem. For instance when HZ=100, the centrino ,which
has a 10µs transition latency, would lead to the governor allowing to
read stats every tick (10ms)!

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dave Jones <davej@redhat.com>
2005-09-20 12:39:35 -07:00
..
Kconfig [CPUFREQ] Conservative cpufreq governer 2005-05-31 19:03:47 -07:00
Makefile [CPUFREQ] Conservative cpufreq governer 2005-05-31 19:03:47 -07:00
cpufreq.c [CPUFREQ] Bugfix: Call driver exit in cpufreq_add_dev error path 2005-08-31 22:21:28 -07:00
cpufreq_conservative.c [CPUFREQ] ondemand,conservative governor idle_tick clean-up 2005-05-31 19:03:49 -07:00
cpufreq_ondemand.c [CPUFREQ] Avoid the ondemand cpufreq governor to use a too high frequency for stats. 2005-09-20 12:39:35 -07:00
cpufreq_performance.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpufreq_powersave.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpufreq_stats.c [PATCH] cpufreq-stats driver updates 2005-05-31 19:04:05 -07:00
cpufreq_userspace.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
freq_table.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00