linux/drivers
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
..
acorn [PATCH] timer initialization cleanup: DEFINE_TIMER 2005-09-09 14:03:48 -07:00
acpi [PATCH] remove ACPI S4bios support 2005-09-10 10:06:35 -07:00
atm [PATCH] timer initialization cleanup: DEFINE_TIMER 2005-09-09 14:03:48 -07:00
base [PATCH] drivers/base/*: use kzalloc instead of kmalloc+memset 2005-09-13 08:22:27 -07:00
block [PATCH] fix pf request handling 2005-09-17 11:50:03 -07:00
bluetooth [Bluetooth] Add ignore parameters to the HCI USB driver 2005-09-13 01:32:37 +02:00
cdrom [PATCH] drivers/cdrom: fix-up schedule_timeout() usage 2005-09-10 10:06:38 -07:00
char Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-09-16 11:54:13 -07:00
connector [NET]: Add netlink connector. 2005-09-11 19:15:07 -07:00
cpufreq [CPUFREQ] Avoid the ondemand cpufreq governor to use a too high frequency for stats. 2005-09-20 12:39:35 -07:00
crypto
dio
eisa
fc4
firmware [PATCH] dell_rbu tidy 2005-09-17 11:50:02 -07:00
hwmon [PATCH] hdaps driver update 2005-09-17 11:50:02 -07:00
i2c [I2C] Add a functionality method, and remove algorithm ids 2005-09-14 22:54:45 +01:00
ide [PATCH] ide: fix null request pointer for taskfile ioctl 2005-09-17 11:50:03 -07:00
ieee1394 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-09-12 20:02:18 -07:00
infiniband Merge master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2005-09-11 10:16:07 -07:00
input [PATCH] SharpSL: Add an input keyboard driver for Zaurus cxx00 series 2005-09-13 08:22:31 -07:00
isdn [PATCH] Fix ST 5481 USB driver 2005-09-17 15:34:30 -07:00
macintosh
mca
md [PATCH] RAID6 Altivec fix 2005-09-17 11:49:58 -07:00
media [PATCH] v4l: fixup on cx88_dvb for Dvico HDTV5 Gold 2005-09-13 08:22:32 -07:00
message [SCSI] fusion SAS support (mptsas driver) minor fix 2005-09-19 12:48:22 -05:00
mfd [MFD] Cleanups suggested by Dmitri, Vojtech and lists. 2005-09-11 10:28:00 +01:00
misc [PATCH] hdpu_cpustate.c: misc_register() can fail 2005-09-10 10:06:25 -07:00
mmc [MMC] Clean up wbsd detection handling 2005-09-12 20:36:19 +01:00
mtd [PATCH] MTD: Update SharpSL partition definitions 2005-09-17 11:49:58 -07:00
net [WAN] hdlc_cisco: Fix regression introduced by skb->tail changes. 2005-09-19 15:39:32 -07:00
nubus
oprofile
parisc [PATCH] merge some from Rusty's trivial patches 2005-09-10 10:06:30 -07:00
parport [PATCH] parport: fix-up schedule_timeout() usage 2005-09-10 10:06:38 -07:00
pci [PATCH] shpchp: Use dword accessors for PCI_ROM_ADDRESS 2005-09-17 11:50:03 -07:00
pcmcia Fix yenta error message when unable to find a bus assignment 2005-09-14 13:05:17 -07:00
pnp
s390 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-09-20 08:50:49 -07:00
sbus [PATCH] Remove unnecessary check_region references in comments 2005-09-13 08:22:29 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-09-20 08:50:49 -07:00
serial [PATCH] Fix up some pm_message_t types 2005-09-17 11:50:00 -07:00
sh
sn
tc [PATCH] Remove unnecessary check_region references in comments 2005-09-13 08:22:29 -07:00
telephony [PATCH] telephony: fix-up schedule_timeout() usage 2005-09-10 10:06:39 -07:00
usb [PATCH] USB: ftdi_sio: custom baud rate fix 2005-09-12 12:23:54 -07:00
video [PATCH] Fix up some pm_message_t types 2005-09-17 11:50:00 -07:00
w1 [PATCH] crc16: remove w1 specific comments. 2005-09-12 12:35:17 -07:00
zorro
Kconfig [NET]: Add netlink connector. 2005-09-11 19:15:07 -07:00
Makefile [NET]: Add netlink connector. 2005-09-11 19:15:07 -07:00