kernel-ark/include/asm-s390
Christoph Lameter f6ac2354d7 [PATCH] zoned vm counters: create vmstat.c/.h from page_alloc.c/.h
NOTE: ZVC are *not* the lightweight event counters.  ZVCs are reliable whereas
event counters do not need to be.

Zone based VM statistics are necessary to be able to determine what the state
of memory in one zone is.  In a NUMA system this can be helpful for local
reclaim and other memory optimizations that may be able to shift VM load in
order to get more balanced memory use.

It is also useful to know how the computing load affects the memory
allocations on various zones.  This patchset allows the retrieval of that data
from userspace.

The patchset introduces a framework for counters that is a cross between the
existing page_stats --which are simply global counters split per cpu-- and the
approach of deferred incremental updates implemented for nr_pagecache.

Small per cpu 8 bit counters are added to struct zone.  If the counter exceeds
certain thresholds then the counters are accumulated in an array of
atomic_long in the zone and in a global array that sums up all zone values.
The small 8 bit counters are next to the per cpu page pointers and so they
will be in high in the cpu cache when pages are allocated and freed.

Access to VM counter information for a zone and for the whole machine is then
possible by simply indexing an array (Thanks to Nick Piggin for pointing out
that approach).  The access to the total number of pages of various types does
no longer require the summing up of all per cpu counters.

Benefits of this patchset right now:

- Ability for UP and SMP configuration to determine how memory
  is balanced between the DMA, NORMAL and HIGHMEM zones.

- loops over all processors are avoided in writeback and
  reclaim paths. We can avoid caching the writeback information
  because the needed information is directly accessible.

- Special handling for nr_pagecache removed.

- zone_reclaim_interval vanishes since VM stats can now determine
  when it is worth to do local reclaim.

- Fast inline per node page state determination.

- Accurate counters in /sys/devices/system/node/node*/meminfo. Current
  counters are counting simply which processor allocated a page somewhere
  and guestimate based on that. So the counters were not useful to show
  the actual distribution of page use on a specific zone.

- The swap_prefetch patch requires per node statistics in order to
  figure out when processors of a node can prefetch. This patch provides
  some of the needed numbers.

- Detailed VM counters available in more /proc and /sys status files.

References to earlier discussions:
V1 http://marc.theaimsgroup.com/?l=linux-kernel&m=113511649910826&w=2
V2 http://marc.theaimsgroup.com/?l=linux-kernel&m=114980851924230&w=2
V3 http://marc.theaimsgroup.com/?l=linux-kernel&m=115014697910351&w=2
V4 http://marc.theaimsgroup.com/?l=linux-kernel&m=115024767318740&w=2

Performance tests with AIM7 did not show any regressions.  Seems to be a tad
faster even.  Tested on ia64/NUMA.  Builds fine on i386, SMP / UP.  Includes
fixes for s390/arm/uml arch code.

This patch:

Move counter code from page_alloc.c/page-flags.h to vmstat.c/h.

Create vmstat.c/vmstat.h by separating the counter code and the proc
functions.

Move the vm_stat_text array before zoneinfo_show.

[akpm@osdl.org: s390 build fix]
[akpm@osdl.org: HOTPLUG_CPU build fix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30 11:25:34 -07:00
..
a.out.h
atomic.h
auxvec.h
bitops.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
ccwdev.h
ccwgroup.h
checksum.h
cio.h
cmb.h [S390] rework of channel measurement facility. 2006-06-29 15:08:41 +02:00
compat.h
cpcmd.h
cputime.h
current.h
dasd.h [S390] add PAV support to the dasd driver. 2006-06-29 15:08:18 +02:00
debug.h
delay.h
div64.h
dma-mapping.h
dma.h
ebcdic.h
elf.h
emergency-restart.h
errno.h
extmem.h
fcntl.h
futex.h
hardirq.h
idals.h
io.h
ioctl.h
ioctls.h
ipc.h
ipcbuf.h
irq.h
kexec.h
kmap_types.h
linkage.h
local.h
lowcore.h
mathemu.h
mman.h
mmu_context.h
mmu.h
module.h
msgbuf.h
mutex.h
namei.h
page.h
param.h
pci.h
percpu.h
pgalloc.h
pgtable.h [PATCH] zoned vm counters: create vmstat.c/.h from page_alloc.c/.h 2006-06-30 11:25:34 -07:00
poll.h
posix_types.h
processor.h
ptrace.h
qdio.h
qeth.h
resource.h
rwsem.h
s390_ext.h
s390_rdev.h
scatterlist.h
sections.h
segment.h
semaphore.h
sembuf.h
setup.h
sfp-machine.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sigp.h
smp.h
socket.h [AF_UNIX]: Datagram getpeersec 2006-06-29 16:58:06 -07:00
sockios.h
spinlock_types.h
spinlock.h
stat.h
statfs.h
string.h
suspend.h
system.h
tape390.h
termbits.h
termios.h
thread_info.h
timer.h
timex.h
tlb.h
tlbflush.h
todclk.h
topology.h
types.h
uaccess.h
ucontext.h
unaligned.h
unistd.h
user.h
vtoc.h
xor.h
z90crypt.h