All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Richard Kennedy <richard@rsk.demon.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"mm-commits@vger.kernel.org" <mm-commits@vger.kernel.org>,
	"chris.mason@oracle.com" <chris.mason@oracle.com>,
	"jens.axboe@oracle.com" <jens.axboe@oracle.com>,
	"mbligh@mbligh.org" <mbligh@mbligh.org>,
	"miklos@szeredi.hu" <miklos@szeredi.hu>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: + mm-balance_dirty_pages-reduce-calls-to-global_page_state-to-reduce-c ache-references.patch added to -mm tree
Date: Thu, 3 Sep 2009 11:09:05 +0800	[thread overview]
Message-ID: <20090903030905.GA12739@localhost> (raw)
In-Reply-To: <20090903022223.GB9474@localhost>

On Thu, Sep 03, 2009 at 10:22:23AM +0800, Wu Fengguang wrote:
> So I suggested just remove clip_bdi_dirty_limit(). To be sure, could
> run with the following patch and check if big numbers are showed.
> 

Simple tests show that clip_bdi_dirty_limit() is no-op with one single
disk and 1-2 dirtier(s):

[...]
[  720.630917] clip_bdi_dirty_limit 0
[  720.753865] clip_bdi_dirty_limit 0
[  720.915198] clip_bdi_dirty_limit 0
[  721.149511] clip_bdi_dirty_limit 0
[...]

Thanks,
Fengguang

> --- linux-mm.orig/mm/page-writeback.c	2009-09-02 17:16:51.000000000 +0800
> +++ linux-mm/mm/page-writeback.c	2009-09-03 10:19:00.000000000 +0800
> @@ -258,6 +258,7 @@ static void clip_bdi_dirty_limit(struct 
>  		unsigned long dirty, unsigned long *pbdi_dirty)
>  {
>  	unsigned long avail_dirty;
> +	unsigned long delta;
>  
>  	avail_dirty = global_page_state(NR_FILE_DIRTY) +
>  		 global_page_state(NR_WRITEBACK) +
> @@ -272,6 +273,11 @@ static void clip_bdi_dirty_limit(struct 
>  	avail_dirty += bdi_stat(bdi, BDI_RECLAIMABLE) +
>  		bdi_stat(bdi, BDI_WRITEBACK);
>  
> +	delta = *pbdi_dirty - min(*pbdi_dirty, avail_dirty);
> +	delta *= 1024;
> +	delta /= *pbdi_dirty + 1;
> +	printk("clip_bdi_dirty_limit %lu\n", delta);
> +
>  	*pbdi_dirty = min(*pbdi_dirty, avail_dirty);
>  }
>  

  reply	other threads:[~2009-09-03  3:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 22:50 + mm-balance_dirty_pages-reduce-calls-to-global_page_state-to-reduce-cache-references.patch added to -mm tree akpm
2009-08-22  2:51 ` + mm-balance_dirty_pages-reduce-calls-to-global_page_state-to-reduce-c ache-references.patch " Wu Fengguang
2009-08-22  2:51   ` Wu Fengguang
2009-08-22 18:11   ` Peter Zijlstra
2009-08-23  1:32     ` Wu Fengguang
2009-08-23  5:31       ` Peter Zijlstra
2009-08-23  7:27         ` Wu Fengguang
2009-08-23  7:45           ` Peter Zijlstra
2009-09-02  8:31     ` Peter Zijlstra
2009-09-02  9:57       ` Wu Fengguang
2009-09-02 10:45         ` Peter Zijlstra
2009-09-02 13:53           ` Richard Kennedy
2009-09-03  2:22             ` Wu Fengguang
2009-09-03  3:09               ` Wu Fengguang [this message]
2009-09-03  9:48               ` Richard Kennedy
2009-09-03 11:05                 ` Wu Fengguang
2009-09-03 12:26                   ` Richard Kennedy
2009-09-03  4:53           ` Wu Fengguang
2009-08-23  9:33   ` Richard Kennedy
2009-08-23  9:33     ` Richard Kennedy
2009-08-23 13:00     ` Wu Fengguang
2009-08-23 13:00       ` Wu Fengguang
2009-08-23 13:46       ` Richard Kennedy
2009-08-23 13:46         ` Richard Kennedy
2009-08-24  1:41         ` Wu Fengguang
2009-08-24  1:41           ` Wu Fengguang

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=20090903030905.GA12739@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mbligh@mbligh.org \
    --cc=miklos@szeredi.hu \
    --cc=mm-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=richard@rsk.demon.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.