summaryrefslogtreecommitdiff
path: root/mm/highmem.c
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2005-05-01 08:58:37 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 08:58:37 -0700
commitedfbe2b0038723e5699ab22695ccd62b5542a5c1 (patch)
treef1c613d32824f274b0e3daf492e87b0c9051c789 /mm/highmem.c
parent2054606ad6dd6fee559fe790f190b15ed9355237 (diff)
downloadlinux-3.10-edfbe2b0038723e5699ab22695ccd62b5542a5c1.tar.gz
linux-3.10-edfbe2b0038723e5699ab22695ccd62b5542a5c1.tar.bz2
linux-3.10-edfbe2b0038723e5699ab22695ccd62b5542a5c1.zip
[PATCH] count bounce buffer pages in vmstat
This is a patch for counting the number of pages for bounce buffers. It's shown in /proc/vmstat. Currently, the number of bounce pages are not counted anywhere. So, if there are many bounce pages, it seems that there are leaked pages. And it's difficult for a user to imagine the usage of bounce pages. So, it's meaningful to show # of bouce pages. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/highmem.c')
-rw-r--r--mm/highmem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/highmem.c b/mm/highmem.c
index d01276506b0..40091159946 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)
continue;
mempool_free(bvec->bv_page, pool);
+ dec_page_state(nr_bounce);
}
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,
to->bv_page = mempool_alloc(pool, q->bounce_gfp);
to->bv_len = from->bv_len;
to->bv_offset = from->bv_offset;
+ inc_page_state(nr_bounce);
if (rw == WRITE) {
char *vto, *vfrom;