linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: lower the dirty balance poll interval
@ 2011-11-17 12:24 Wu Fengguang
  2011-11-21 20:36 ` Chris Mason
  0 siblings, 1 reply; 3+ messages in thread
From: Wu Fengguang @ 2011-11-17 12:24 UTC (permalink / raw)
  To: Chris Mason; +Cc: linux-fsdevel, LKML

Tests show that the original large intervals can easily make the dirty
limit exceeded on 100 concurrent dd's. So adapt to as large as the
next check point selected by the dirty throttling algorithm.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 fs/btrfs/file.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next.orig/fs/btrfs/file.c	2011-11-17 20:18:51.000000000 +0800
+++ linux-next/fs/btrfs/file.c	2011-11-17 20:18:55.000000000 +0800
@@ -1168,6 +1168,8 @@ static noinline ssize_t __btrfs_buffered
 	nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) /
 		     PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
 		     (sizeof(struct page *)));
+	nrptrs = min(nrptrs, current->nr_dirtied_pause - current->nr_dirtied);
+	nrptrs = max(nrptrs, 8);
 	pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL);
 	if (!pages)
 		return -ENOMEM;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: lower the dirty balance poll interval
  2011-11-17 12:24 [PATCH] btrfs: lower the dirty balance poll interval Wu Fengguang
@ 2011-11-21 20:36 ` Chris Mason
  2011-11-22  2:21   ` Wu Fengguang
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Mason @ 2011-11-21 20:36 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: linux-fsdevel, LKML

On Thu, Nov 17, 2011 at 08:24:03PM +0800, Wu Fengguang wrote:
> Tests show that the original large intervals can easily make the dirty
> limit exceeded on 100 concurrent dd's. So adapt to as large as the
> next check point selected by the dirty throttling algorithm.

Thanks Wu, were you planning on pushing this through your tree or should
I take it?

-chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs: lower the dirty balance poll interval
  2011-11-21 20:36 ` Chris Mason
@ 2011-11-22  2:21   ` Wu Fengguang
  0 siblings, 0 replies; 3+ messages in thread
From: Wu Fengguang @ 2011-11-22  2:21 UTC (permalink / raw)
  To: Chris Mason, linux-fsdevel, LKML

On Tue, Nov 22, 2011 at 04:36:14AM +0800, Chris Mason wrote:
> On Thu, Nov 17, 2011 at 08:24:03PM +0800, Wu Fengguang wrote:
> > Tests show that the original large intervals can easily make the dirty
> > limit exceeded on 100 concurrent dd's. So adapt to as large as the
> > next check point selected by the dirty throttling algorithm.
> 
> Thanks Wu, were you planning on pushing this through your tree or should
> I take it?

Will you take it please?

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-22  2:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 12:24 [PATCH] btrfs: lower the dirty balance poll interval Wu Fengguang
2011-11-21 20:36 ` Chris Mason
2011-11-22  2:21   ` Wu Fengguang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).