Re: [kernel oops when locking the cluster using HAS]
--- KAMEZAWA Hiroyuki <[email protected]>
Quoted 23 lines · wrote:
Hi,
This is a updated version of a patch for counting
bouce buffer page.
A major change is :/proc/vmstatis used to show usage.Thanks
-- KameQuoted 1 line
This is a patch for counting the number of pages for bounce buffer.
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.
Quoted 9 lines
Signed-off-by: KAMEZAWA Hiroyuki
<[email protected]>---
linux-2.6.12-rc2-mm3-kamezawa/include/linux/page-flags.h
Quoted 45 lines
| 1 +
linux-2.6.12-rc2-mm3-kamezawa/mm/highmem.c| 2 ++ linux-2.6.12-rc2-mm3-kamezawa/mm/page_alloc.c | 1 + 3 files changed, 4 insertions(+)diff -puN
mm/highmem.c~count_bouncemm/highmem.c--- linux-2.6.12-rc2-mm3/mm/highmem.c~count_bounce2005-04-25 12:04:28.000000000 +0900 +++ linux-2.6.12-rc2-mm3-kamezawa/mm/highmem.c 2005-04-27 10:25:51.000000000 +0900(quoted diff) +0
-0@@ -325,6 +325,7 @@ static void bounce_end_io(structbio *bi
(quoted diff) +1
-0continue; 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_q
(quoted diff) +1
-0to->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;diff -puN
mm/page_alloc.c~count_bouncemm/page_alloc.c
---
linux-2.6.12-rc2-mm3/mm/page_alloc.c~count_bounce2005-04-27 10:15:39.000000000 +0900 +++ linux-2.6.12-rc2-mm3-kamezawa/mm/page_alloc.c 2005-04-27 10:17:18.000000000 +0900(quoted diff) +1
-0@@ -1902,6 +1902,7 @@ static char *vmstat_text[] = { "nr_page_table_pages", "nr_mapped", "nr_slab", + "nr_bounce", "pgpgin", "pgpgout",
Quoted 4 lines
diff -puN
include/linux/page-flags.h~count_bounceinclude/linux/page-flags.h
---
linux-2.6.12-rc2-mm3/include/linux/page-flags.h~count_bounce
Quoted 3 lines
2005-04-27 10:23:15.000000000 +0900+++
linux-2.6.12-rc2-mm3-kamezawa/include/linux/page-flags.h
Quoted 11 lines
2005-04-27 10:24:11.000000000 +0900(quoted diff) +0
-0@@ -89,6 +89,7 @@ struct page_state { unsigned long nr_page_table_pages;/* Pages usedfor pagetables */
unsigned longnr_mapped; /* mapped into pagetables
*/(quoted diff) +1
-0unsigned long nr_slab; /* In slab */ + unsigned long nr_bounce; /* pages for bouncebuffers */
#defineGET_PAGE_STATE_LASTnr_slab
Quoted 4 lines
/*
_
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com