aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-09-27 01:50:00 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 08:26:12 -0700
commite129b5c23c2b471d47f1c5d2b8b193fc2034af43 (patch)
tree78232266849d0f04b056b0f44554bcb476f0b8e1
parentfb01439c5b778d5974a488c5d4fe85e6d0e18a68 (diff)
downloadlinux-e129b5c23c2b471d47f1c5d2b8b193fc2034af43.tar.gz
[PATCH] vm: add per-zone writeout counter
The VM is supposed to minimise the number of pages which get written off the LRU (for IO scheduling efficiency, and for high reclaim-success rates). But we don't actually have a clear way of showing how true this is. So add `nr_vmscan_write' to /proc/vmstat and /proc/zoneinfo - the number of pages which have been written by the vm scanner in this zone and globally. Cc: Christoph Lameter <clameter@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/mmzone.h1
-rw-r--r--mm/vmscan.c3
-rw-r--r--mm/vmstat.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 7fa1cbe9fa7aac..1b0680cd84d2f0 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -58,6 +58,7 @@ enum zone_stat_item {
NR_WRITEBACK,
NR_UNSTABLE_NFS, /* NFS unstable pages */
NR_BOUNCE,
+ NR_VMSCAN_WRITE,
#ifdef CONFIG_NUMA
NUMA_HIT, /* allocated in intended node */
NUMA_MISS, /* allocated in non intended node */
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 87779dda4ec6d7..87d340999ce8a5 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -19,6 +19,7 @@
#include <linux/pagemap.h>
#include <linux/init.h>
#include <linux/highmem.h>
+#include <linux/vmstat.h>
#include <linux/file.h>
#include <linux/writeback.h>
#include <linux/blkdev.h>
@@ -370,7 +371,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping)
/* synchronous write or broken a_ops? */
ClearPageReclaim(page);
}
-
+ inc_zone_page_state(page, NR_VMSCAN_WRITE);
return PAGE_SUCCESS;
}
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 490d8c1a0ded5e..69c657132e1f79 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -465,6 +465,7 @@ static char *vmstat_text[] = {
"nr_writeback",
"nr_unstable",
"nr_bounce",
+ "nr_vmscan_write",
#ifdef CONFIG_NUMA
"numa_hit",