From: Wu Fengguang <fengguang.wu@intel.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jan Kara <jack@suse.cz>, Dave Chinner <david@fromorbit.com>,
Andrew Morton <akpm@linux-foundation.org>,
Richard Kennedy <richard@rsk.demon.co.uk>,
Hugh Dickins <hughd@google.com>, Rik van Riel <riel@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 4/4] writeback: reduce per-bdi dirty threshold ramp up time
Date: Sun, 17 Apr 2011 10:11:11 +0800 [thread overview]
Message-ID: <20110417021111.GA11352@localhost> (raw)
In-Reply-To: <20110416142114.GA12220@localhost>
On Sat, Apr 16, 2011 at 10:21:14PM +0800, Wu Fengguang wrote:
> On Sat, Apr 16, 2011 at 04:33:29PM +0800, Peter Zijlstra wrote:
> > On Sat, 2011-04-16 at 00:13 +0200, Jan Kara wrote:
> > >
> > > So what is a takeaway from this for me is that scaling the period
> > > with the dirty limit is not the right thing. If you'd have 4-times more
> > > memory, your choice of "dirty limit" as the period would be as bad as
> > > current 4*"dirty limit". What would seem like a better choice of period
> > > to me would be to have the period in an order of a few seconds worth of
> > > writeback. That would allow the bdi limit to scale up reasonably fast when
> > > new bdi starts to be used and still not make it fluctuate that much
> > > (hopefully).
> >
> > No best would be to scale the period with the writeout bandwidth, but
> > lacking that the dirty limit had to do. Since we're counting pages, and
> > bandwidth is pages/second we'll end up with a time measure, exactly the
> > thing you wanted.
>
> I owe you the patch :) Here is a tested one for doing the bandwidth
> based scaling. It's based on the attached global writeout bandwidth
> estimation.
>
> I tried updating the shift both on rosed and fallen bandwidth, however
> that leads to reset of the accumulated proportion values. So here the
> shift will only be increased and never decreased.
I cannot reproduce the issue now. It may be due to the bandwidth
estimation went wrong and get tiny values at times in an early patch,
thus "resetting" the proportional values.
I'll carry the below version in future tests. In theory we could do
more coarse tracking with
if (abs(shift - vm_completions.pg[0].shift) <= 1)
return;
But let's do it more diligent now.
Thanks,
Fengguang
---
@@ -143,6 +136,13 @@ static int calc_period_shift(void)
static void update_completion_period(void)
{
int shift = calc_period_shift();
+
+ if (shift > PROP_MAX_SHIFT)
+ shift = PROP_MAX_SHIFT;
+
+ if (shift == vm_completions.pg[0].shift)
+ return;
+
prop_change_shift(&vm_completions, shift);
prop_change_shift(&vm_dirties, shift);
}
next prev parent reply other threads:[~2011-04-17 2:11 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110413085937.981293444@intel.com>
2011-04-13 8:59 ` [PATCH 1/4] writeback: add bdi_dirty_limit() kernel-doc Wu Fengguang
2011-04-13 21:47 ` Jan Kara
2011-04-13 8:59 ` [PATCH 2/4] writeback: avoid duplicate balance_dirty_pages_ratelimited() calls Wu Fengguang
2011-04-13 21:53 ` Jan Kara
2011-04-14 0:30 ` Wu Fengguang
2011-04-14 10:20 ` Jan Kara
2011-04-13 8:59 ` [PATCH 3/4] writeback: skip balance_dirty_pages() for in-memory fs Wu Fengguang
2011-04-13 21:54 ` Jan Kara
2011-04-13 8:59 ` [PATCH 4/4] writeback: reduce per-bdi dirty threshold ramp up time Wu Fengguang
2011-04-13 22:04 ` Jan Kara
2011-04-13 23:31 ` Wu Fengguang
2011-04-13 23:52 ` Dave Chinner
2011-04-14 0:23 ` Wu Fengguang
2011-04-14 10:36 ` Richard Kennedy
2011-04-14 13:49 ` Wu Fengguang
2011-04-14 14:08 ` Wu Fengguang
[not found] ` <20110414151424.GA367@localhost>
2011-04-14 15:56 ` Wu Fengguang
2011-04-14 18:16 ` Jan Kara
2011-04-15 3:43 ` Wu Fengguang
[not found] ` <20110415143711.GA17181@localhost>
2011-04-15 22:13 ` Jan Kara
2011-04-16 6:05 ` Wu Fengguang
2011-04-16 8:33 ` Peter Zijlstra
2011-04-16 14:21 ` Wu Fengguang
2011-04-17 2:11 ` Wu Fengguang [this message]
2011-04-18 14:59 ` Jan Kara
2011-05-24 12:24 ` Peter Zijlstra
2011-05-24 12:41 ` Peter Zijlstra
2011-06-09 23:58 ` Jan Kara
2011-04-13 10:15 ` [PATCH 0/4] trivial writeback fixes Peter Zijlstra
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=20110417021111.GA11352@localhost \
--to=fengguang.wu@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=richard@rsk.demon.co.uk \
--cc=riel@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).