kernel_optimize_test/drivers
Christoph Lameter f8891e5e1f [PATCH] Light weight event counters
The remaining counters in page_state after the zoned VM counter patches
have been applied are all just for show in /proc/vmstat.  They have no
essential function for the VM.

We use a simple increment of per cpu variables.  In order to avoid the most
severe races we disable preempt.  Preempt does not prevent the race between
an increment and an interrupt handler incrementing the same statistics
counter.  However, that race is exceedingly rare, we may only loose one
increment or so and there is no requirement (at least not in kernel) that
the vm event counters have to be accurate.

In the non preempt case this results in a simple increment for each
counter.  For many architectures this will be reduced by the compiler to a
single instruction.  This single instruction is atomic for i386 and x86_64.
 And therefore even the rare race condition in an interrupt is avoided for
both architectures in most cases.

The patchset also adds an off switch for embedded systems that allows a
building of linux kernels without these counters.

The implementation of these counters is through inline code that hopefully
results in only a single instruction increment instruction being emitted
(i386, x86_64) or in the increment being hidden though instruction
concurrency (EPIC architectures such as ia64 can get that done).

Benefits:
- VM event counter operations usually reduce to a single inline instruction
  on i386 and x86_64.
- No interrupt disable, only preempt disable for the preempt case.
  Preempt disable can also be avoided by moving the counter into a spinlock.
- Handling is similar to zoned VM counters.
- Simple and easily extendable.
- Can be omitted to reduce memory use for embedded use.

References:

RFC http://marc.theaimsgroup.com/?l=linux-kernel&m=113512330605497&w=2
RFC http://marc.theaimsgroup.com/?l=linux-kernel&m=114988082814934&w=2
local_t http://marc.theaimsgroup.com/?l=linux-kernel&m=114991748606690&w=2
V2 http://marc.theaimsgroup.com/?t=115014808400007&r=1&w=2
V3 http://marc.theaimsgroup.com/?l=linux-kernel&m=115024767022346&w=2
V4 http://marc.theaimsgroup.com/?l=linux-kernel&m=115047968808926&w=2

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30 11:25:36 -07:00
..
acorn
acpi [PATCH] pgdat allocation for new node add (get node id by acpi) 2006-06-27 17:32:36 -07:00
amba [PATCH] 64bit resource: fix up printks for resources in misc drivers 2006-06-27 09:23:59 -07:00
atm [ATM]: [suni] change suni_init to __devinit 2006-06-29 16:58:17 -07:00
base [PATCH] Use Zoned VM Counters for NUMA statistics 2006-06-30 11:25:36 -07:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
bluetooth
cdrom [PATCH] devfs: Last little devfs cleanups throughout the kernel tree. 2006-06-26 12:25:09 -07:00
char [PATCH] fix ISTALLION=y 2006-06-30 11:25:34 -07:00
clocksource
connector
cpufreq [PATCH] cpu hotplug: make cpu_notifier related notifier blocks __cpuinit only 2006-06-27 17:32:41 -07:00
crypto
dio
dma
edac
eisa
fc4
firmware
hwmon
i2c [PATCH] i2c-i801.c: don't pci_disable_device() after it was just enabled 2006-06-27 18:36:39 -07:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
ieee1394 [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed 2006-06-27 09:24:00 -07:00
infiniband [PATCH] 64bit resource: fix up printks for resources in misc drivers 2006-06-27 09:23:59 -07:00
input [SERIO] i8042-sparcio.h: Convert to of_driver framework. 2006-06-29 16:38:01 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
leds [PATCH] spin/rwlock init cleanups 2006-06-27 17:32:39 -07:00
macintosh Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
mfd
misc [PATCH] spin/rwlock init cleanups 2006-06-27 17:32:39 -07:00
mmc Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
mtd Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2006-06-29 10:49:17 -07:00
net Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-06-29 17:43:43 -07:00
nubus
oprofile
parisc [PATCH] Light weight event counters 2006-06-30 11:25:36 -07:00
parport Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-26 13:33:14 -07:00
pci Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2006-06-29 10:49:17 -07:00
pcmcia Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2006-06-29 10:49:17 -07:00
pnp [PATCH] 64bit resource: change pnp core to use resource_size_t 2006-06-27 09:24:00 -07:00
rapidio [PATCH] spin/rwlock init cleanups 2006-06-27 17:32:39 -07:00
rtc [PATCH] RTC: add rtc-rs5c348 driver 2006-06-28 14:59:04 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
sbus [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree 2006-06-26 12:25:08 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2006-06-29 10:49:17 -07:00
serial [SERIAL] sunsab: Fix section mis-match errors. 2006-06-29 16:37:53 -07:00
sh
sn [PATCH] remove devinit from ioc4 pci_driver 2006-06-29 10:26:20 -07:00
spi [PATCH] SPI: infrastructure to initialize spi_device.mode early 2006-06-28 15:51:01 -07:00
tc [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV 2006-06-26 12:25:09 -07:00
telephony Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
usb [PATCH] usb gadget: fixup pxa2xx_udc to include asm/arch/udc.h again 2006-06-29 14:27:22 -07:00
video [PATCH] fix drivers/video/imacfb.c compilation 2006-06-30 11:25:34 -07:00
w1
zorro
Kconfig
Makefile