From: David Chinner <dgc@sgi.com>
To: Neil Brown <neilb@suse.de>
Cc: David Chinner <dgc@sgi.com>, Andi Kleen <ak@suse.de>,
Jens Axboe <axboe@suse.de>,
linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: RFC - how to balance Dirty+Writeback in the face of slow writeback.
Date: Mon, 28 Aug 2006 11:55:57 +1000 [thread overview]
Message-ID: <20060828015557.GI807830@melbourne.sgi.com> (raw)
In-Reply-To: <17646.35231.690105.300713@cse.unsw.edu.au>
On Fri, Aug 25, 2006 at 03:24:47PM +1000, Neil Brown wrote:
> On Tuesday August 22, dgc@sgi.com wrote:
> > AFAICT, all we need to do is prevent interactions between bdis and
> > the current problem is that we loop on clean bdis waiting for slow
> > dirty ones to drain.
> >
> > My thoughts are along the lines of a decay in nr_to_write between
> > loop iterations when we don't write out enough pages (i.e. clean
> > bdi) so we break out of the loop sooner rather than later.
>
> I don't understand the purpose of the decay. Once you are sure the
> bdi is clean, why not break out of the loop straight away?
Simply to slow down the rate at which any process is dirtying
memory. The decay only becomes active when you're writing to a
clean device when there are lots of dirty pages on a slow device,
otherwise it's a no-op.
To illustrate the problem of breaking straight out of the throttle
loop, even though we hit the dirty rate limit we may have
dirtied pages on multiple bdis but we are only flushing on one of
them. Hence we could potentially trigger increasing numbers of
dirty pages if we don't back off in some way when throttling here
even though the device we throttled on was clean.
e.g. Think of writing data to a slow device, then a log entry to a fast
device, and every time the write to the fast device triggers the
throttling which gets cleaned and we go and dirty more pages on
the slow device immediately without throttling....
> Also, your code is a little confusing. The
Sorry, it was a quick hack to illustrate my thinking.....
> So I would like us to break out of the loop as soon as there is good
> reason to believe the bdi is clean.
Which was exactly my line of thinking, but tempered by the fact that
just breaking out of the loop could introduce a nasty problem....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2006-08-28 1:56 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 23:40 RFC - how to balance Dirty+Writeback in the face of slow writeback Neil Brown
2006-08-15 8:06 ` Andrew Morton
2006-08-15 23:00 ` David Chinner
2006-08-17 4:08 ` Neil Brown
2006-08-17 6:14 ` Andrew Morton
2006-08-17 12:36 ` Trond Myklebust
2006-08-17 15:14 ` Andrew Morton
2006-08-17 16:22 ` Trond Myklebust
2006-08-18 5:49 ` Andrew Morton
2006-08-18 10:43 ` Nikita Danilov
2006-08-18 0:11 ` David Chinner
2006-08-18 6:29 ` Andrew Morton
2006-08-18 7:03 ` Jens Axboe
2006-08-18 7:11 ` Andrew Morton
2006-08-18 18:57 ` Andi Kleen
2006-08-21 0:35 ` Neil Brown
2006-08-21 3:15 ` David Chinner
2006-08-21 7:24 ` Neil Brown
2006-08-21 13:51 ` Jens Axboe
2006-08-25 4:36 ` Neil Brown
2006-08-25 6:37 ` Jens Axboe
2006-08-28 1:28 ` David Chinner
2006-08-25 13:16 ` Trond Myklebust
2006-08-27 8:21 ` Neil Brown
2006-08-21 14:28 ` David Chinner
2006-08-25 5:24 ` Neil Brown
2006-08-28 1:55 ` David Chinner [this message]
2006-08-21 7:47 ` Andi Kleen
2006-08-18 7:07 ` Neil Brown
2006-08-17 22:17 ` David Chinner
2006-08-17 3:59 ` Neil Brown
2006-08-17 6:22 ` Andrew Morton
2006-08-17 8:36 ` Jens Axboe
2006-08-17 13:21 ` Trond Myklebust
2006-08-17 15:30 ` Andrew Morton
2006-08-17 16:18 ` Trond Myklebust
2006-08-18 5:34 ` Andrew Morton
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=20060828015557.GI807830@melbourne.sgi.com \
--to=dgc@sgi.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/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