diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-06-30 04:55:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-30 14:25:36 -0400 |
commit | d2c5e30c9a1420902262aa923794d2ae4e0bc391 (patch) | |
tree | b8c42c189c2bc8dd4b6d808ee8ed2b28dbd70ddd | |
parent | fd39fc8561be33065306bdac0e30414e1e8ac8e1 (diff) |
[PATCH] zoned vm counters: conversion of nr_bounce to per zone counter
Conversion of nr_bounce to a per zone counter
nr_bounce is only used for proc output. So it could be left as an event
counter. However, the event counters may not be accurate and nr_bounce is
categorizing types of pages in a zone. So we really need this to also be a
per zone counter.
[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/base/node.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_misc.c | 2 | ||||
-rw-r--r-- | include/linux/mmzone.h | 1 | ||||
-rw-r--r-- | include/linux/vmstat.h | 1 | ||||
-rw-r--r-- | mm/highmem.c | 6 | ||||
-rw-r--r-- | mm/vmstat.c | 2 |
6 files changed, 9 insertions, 5 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index b73d869c9d48..772eadac57a7 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -65,6 +65,7 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
65 | "Node %d AnonPages: %8lu kB\n" | 65 | "Node %d AnonPages: %8lu kB\n" |
66 | "Node %d PageTables: %8lu kB\n" | 66 | "Node %d PageTables: %8lu kB\n" |
67 | "Node %d NFS Unstable: %8lu kB\n" | 67 | "Node %d NFS Unstable: %8lu kB\n" |
68 | "Node %d Bounce: %8lu kB\n" | ||
68 | "Node %d Slab: %8lu kB\n", | 69 | "Node %d Slab: %8lu kB\n", |
69 | nid, K(i.totalram), | 70 | nid, K(i.totalram), |
70 | nid, K(i.freeram), | 71 | nid, K(i.freeram), |
@@ -82,6 +83,7 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
82 | nid, K(node_page_state(nid, NR_ANON_PAGES)), | 83 | nid, K(node_page_state(nid, NR_ANON_PAGES)), |
83 | nid, K(node_page_state(nid, NR_PAGETABLE)), | 84 | nid, K(node_page_state(nid, NR_PAGETABLE)), |
84 | nid, K(node_page_state(nid, NR_UNSTABLE_NFS)), | 85 | nid, K(node_page_state(nid, NR_UNSTABLE_NFS)), |
86 | nid, K(node_page_state(nid, NR_BOUNCE)), | ||
85 | nid, K(node_page_state(nid, NR_SLAB))); | 87 | nid, K(node_page_state(nid, NR_SLAB))); |
86 | n += hugetlb_report_node_meminfo(nid, buf + n); | 88 | n += hugetlb_report_node_meminfo(nid, buf + n); |
87 | return n; | 89 | return n; |
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index eae66b41a1a4..6aa2aa779a09 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -171,6 +171,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
171 | "Slab: %8lu kB\n" | 171 | "Slab: %8lu kB\n" |
172 | "PageTables: %8lu kB\n" | 172 | "PageTables: %8lu kB\n" |
173 | "NFS Unstable: %8lu kB\n" | 173 | "NFS Unstable: %8lu kB\n" |
174 | "Bounce: %8lu kB\n" | ||
174 | "CommitLimit: %8lu kB\n" | 175 | "CommitLimit: %8lu kB\n" |
175 | "Committed_AS: %8lu kB\n" | 176 | "Committed_AS: %8lu kB\n" |
176 | "VmallocTotal: %8lu kB\n" | 177 | "VmallocTotal: %8lu kB\n" |
@@ -196,6 +197,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
196 | K(global_page_state(NR_SLAB)), | 197 | K(global_page_state(NR_SLAB)), |
197 | K(global_page_state(NR_PAGETABLE)), | 198 | K(global_page_state(NR_PAGETABLE)), |
198 | K(global_page_state(NR_UNSTABLE_NFS)), | 199 | K(global_page_state(NR_UNSTABLE_NFS)), |
200 | K(global_page_state(NR_BOUNCE)), | ||
199 | K(allowed), | 201 | K(allowed), |
200 | K(committed), | 202 | K(committed), |
201 | (unsigned long)VMALLOC_TOTAL >> 10, | 203 | (unsigned long)VMALLOC_TOTAL >> 10, |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index e9d80697f555..2dbeec1d2874 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -56,6 +56,7 @@ enum zone_stat_item { | |||
56 | NR_FILE_DIRTY, | 56 | NR_FILE_DIRTY, |
57 | NR_WRITEBACK, | 57 | NR_WRITEBACK, |
58 | NR_UNSTABLE_NFS, /* NFS unstable pages */ | 58 | NR_UNSTABLE_NFS, /* NFS unstable pages */ |
59 | NR_BOUNCE, | ||
59 | NR_VM_ZONE_STAT_ITEMS }; | 60 | NR_VM_ZONE_STAT_ITEMS }; |
60 | 61 | ||
61 | struct per_cpu_pages { | 62 | struct per_cpu_pages { |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 9de2a41c885c..5b5b96afc395 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -67,7 +67,6 @@ struct page_state { | |||
67 | unsigned long allocstall; /* direct reclaim calls */ | 67 | unsigned long allocstall; /* direct reclaim calls */ |
68 | 68 | ||
69 | unsigned long pgrotated; /* pages rotated to tail of the LRU */ | 69 | unsigned long pgrotated; /* pages rotated to tail of the LRU */ |
70 | unsigned long nr_bounce; /* pages for bounce buffers */ | ||
71 | }; | 70 | }; |
72 | 71 | ||
73 | extern void get_full_page_state(struct page_state *ret); | 72 | extern void get_full_page_state(struct page_state *ret); |
diff --git a/mm/highmem.c b/mm/highmem.c index 9b274fdf9d08..9b2a5403c447 100644 --- a/mm/highmem.c +++ b/mm/highmem.c | |||
@@ -315,8 +315,8 @@ static void bounce_end_io(struct bio *bio, mempool_t *pool, int err) | |||
315 | if (bvec->bv_page == org_vec->bv_page) | 315 | if (bvec->bv_page == org_vec->bv_page) |
316 | continue; | 316 | continue; |
317 | 317 | ||
318 | mempool_free(bvec->bv_page, pool); | 318 | dec_zone_page_state(bvec->bv_page, NR_BOUNCE); |
319 | dec_page_state(nr_bounce); | 319 | mempool_free(bvec->bv_page, pool); |
320 | } | 320 | } |
321 | 321 | ||
322 | bio_endio(bio_orig, bio_orig->bi_size, err); | 322 | bio_endio(bio_orig, bio_orig->bi_size, err); |
@@ -397,7 +397,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig, | |||
397 | to->bv_page = mempool_alloc(pool, q->bounce_gfp); | 397 | to->bv_page = mempool_alloc(pool, q->bounce_gfp); |
398 | to->bv_len = from->bv_len; | 398 | to->bv_len = from->bv_len; |
399 | to->bv_offset = from->bv_offset; | 399 | to->bv_offset = from->bv_offset; |
400 | inc_page_state(nr_bounce); | 400 | inc_zone_page_state(to->bv_page, NR_BOUNCE); |
401 | 401 | ||
402 | if (rw == WRITE) { | 402 | if (rw == WRITE) { |
403 | char *vto, *vfrom; | 403 | char *vto, *vfrom; |
diff --git a/mm/vmstat.c b/mm/vmstat.c index 9dc270aed5c4..25e5ca7c1743 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -381,6 +381,7 @@ static char *vmstat_text[] = { | |||
381 | "nr_dirty", | 381 | "nr_dirty", |
382 | "nr_writeback", | 382 | "nr_writeback", |
383 | "nr_unstable", | 383 | "nr_unstable", |
384 | "nr_bounce", | ||
384 | 385 | ||
385 | /* Event counters */ | 386 | /* Event counters */ |
386 | "pgpgin", | 387 | "pgpgin", |
@@ -428,7 +429,6 @@ static char *vmstat_text[] = { | |||
428 | "allocstall", | 429 | "allocstall", |
429 | 430 | ||
430 | "pgrotated", | 431 | "pgrotated", |
431 | "nr_bounce", | ||
432 | }; | 432 | }; |
433 | 433 | ||
434 | /* | 434 | /* |