mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: dipankar das <dipankar_dd@yahoo.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [kernel oops when locking the cluster using HAS]
Date: Wed, 27 Apr 2005 01:34:54 -0700 (PDT)	[thread overview]
Message-ID: <20050427083454.26893.qmail@web40711.mail.yahoo.com> (raw)
In-Reply-To: 6667


--- KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
wrote:
> Hi,
> 
> This is a updated version of a patch for counting
> bouce buffer page.
> A major change is :
> /proc/vmstat is used to show usage.
> 
> Thanks
> -- Kame
> > 
> 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.
> 
> Signed-off-by: KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@jp.fujitsu.com>
> 
> 
> 
> ---
> 
> 
>
linux-2.6.12-rc2-mm3-kamezawa/include/linux/page-flags.h
> |    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_bounce mm/highmem.c
> --- linux-2.6.12-rc2-mm3/mm/highmem.c~count_bounce
> 2005-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
> @@ -325,6 +325,7 @@ static void bounce_end_io(struct
> bio *bi
>  			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_q
>  		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;
> diff -puN mm/page_alloc.c~count_bounce
> mm/page_alloc.c
> ---
> linux-2.6.12-rc2-mm3/mm/page_alloc.c~count_bounce
> 2005-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
> @@ -1902,6 +1902,7 @@ static char *vmstat_text[] = {
>  	"nr_page_table_pages",
>  	"nr_mapped",
>  	"nr_slab",
> +	"nr_bounce",
>  
>  	"pgpgin",
>  	"pgpgout",
> diff -puN include/linux/page-flags.h~count_bounce
> include/linux/page-flags.h
> ---
>
linux-2.6.12-rc2-mm3/include/linux/page-flags.h~count_bounce
> 2005-04-27 10:23:15.000000000 +0900
> +++
>
linux-2.6.12-rc2-mm3-kamezawa/include/linux/page-flags.h
> 2005-04-27 10:24:11.000000000 +0900
> @@ -89,6 +89,7 @@ struct page_state {
>  	unsigned long nr_page_table_pages;/* Pages used
> for pagetables */
>  	unsigned long nr_mapped;	/* mapped into pagetables
> */
>  	unsigned long nr_slab;		/* In slab */
> +	unsigned long nr_bounce;	/* pages for bounce
> buffers */
>  #define GET_PAGE_STATE_LAST nr_slab
>  
>  	/*
> 
> _
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

             reply	other threads:[~2005-04-27  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-27  8:34 dipankar das [this message]
2005-04-27  8:34 dipankar das
2005-04-27  8:56 dipankar das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050427083454.26893.qmail@web40711.mail.yahoo.com \
    --to=dipankar_dd@yahoo.com \
    --cc=akpm@osdl.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®