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 [CRYPTO] Update IV correctly for Padlock CBC encryption 2005-07-06 13:54:09 -07:00
dio [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
eisa [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks 2005-06-20 15:15:32 -07:00
fc4 [SCSI] fc4 warning fix 2005-07-30 09:47:53 -05:00
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 [PATCH] swsusp: switch pm_message_t to struct 2005-09-05 00:06:16 -07:00
mca [PATCH] unexport mca_find_device_by_slot 2005-06-25 16:24:56 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
oprofile [PATCH] clean up inline static vs static inline 2005-07-27 16:26:20 -07:00
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 Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
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 [PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
sn [PATCH] ioc4: PCI bus speed detection 2005-06-21 18:46:32 -07:00
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 08:48:08 -07:00
zorro [PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks 2005-06-20 15:15:35 -07:00
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