aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/page-flags.h1
-rw-r--r--mm/highmem.c2
-rw-r--r--mm/page_alloc.c1
3 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6b74fcf5bb63..39ab8c6b5652 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -131,6 +131,7 @@ struct page_state {
131 unsigned long allocstall; /* direct reclaim calls */ 131 unsigned long allocstall; /* direct reclaim calls */
132 132
133 unsigned long pgrotated; /* pages rotated to tail of the LRU */ 133 unsigned long pgrotated; /* pages rotated to tail of the LRU */
134 unsigned long nr_bounce; /* pages for bounce buffers */
134}; 135};
135 136
136extern void get_page_state(struct page_state *ret); 137extern void get_page_state(struct page_state *ret);
diff --git a/mm/highmem.c b/mm/highmem.c
index d01276506b00..400911599468 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -325,6 +325,7 @@ static void bounce_end_io(struct bio *bio, mempool_t *pool, int err)
325 continue; 325 continue;
326 326
327 mempool_free(bvec->bv_page, pool); 327 mempool_free(bvec->bv_page, pool);
328 dec_page_state(nr_bounce);
328 } 329 }
329 330
330 bio_endio(bio_orig, bio_orig->bi_size, err); 331 bio_endio(bio_orig, bio_orig->bi_size, err);
@@ -405,6 +406,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig,
405 to->bv_page = mempool_alloc(pool, q->bounce_gfp); 406 to->bv_page = mempool_alloc(pool, q->bounce_gfp);
406 to->bv_len = from->bv_len; 407 to->bv_len = from->bv_len;
407 to->bv_offset = from->bv_offset; 408 to->bv_offset = from->bv_offset;
409 inc_page_state(nr_bounce);
408 410
409 if (rw == WRITE) { 411 if (rw == WRITE) {
410 char *vto, *vfrom; 412 char *vto, *vfrom;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 04a35b3d3262..80ce7f2104df 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1897,6 +1897,7 @@ static char *vmstat_text[] = {
1897 "allocstall", 1897 "allocstall",
1898 1898
1899 "pgrotated", 1899 "pgrotated",
1900 "nr_bounce",
1900}; 1901};
1901 1902
1902static void *vmstat_start(struct seq_file *m, loff_t *pos) 1903static void *vmstat_start(struct seq_file *m, loff_t *pos)