From: Wu Fengguang <fengguang.wu@intel.com>
To: Jan Kara <jack@suse.cz>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/7] writeback: fix dirtied pages accounting on sub-page writes
Date: Thu, 8 Dec 2011 10:44:25 +0800 [thread overview]
Message-ID: <20111208024425.GA7717@localhost> (raw)
In-Reply-To: <20111207160753.GJ4622@quack.suse.cz>
On Thu, Dec 08, 2011 at 12:07:53AM +0800, Jan Kara wrote:
> On Wed 07-12-11 20:08:18, Wu Fengguang wrote:
> > On Wed, Dec 07, 2011 at 06:53:40PM +0800, Jan Kara wrote:
> > > On Mon 28-11-11 21:53:41, Wu Fengguang wrote:
> > > > When dd in 512bytes, generic_perform_write() calls
> > > > balance_dirty_pages_ratelimited() 8 times for the same page, but
> > > > obviously the page is only dirtied once.
> > > Actually, for ppc where pages can be 64 KB the problem is even worse.
> >
> > Ah yes.
> >
> > > > Fix it by accounting tsk->nr_dirtied and bdp_ratelimits at page dirty time.
> > > I was wondering about one more thing - couldn't we rather check in
> > > generic_perform_write() whether the page was dirty before calling
> > > ->write_end and call balance_dirty_pages_ratelimited() only if it wasn't?
> >
> > Cough.. the very original version does that exactly, then you raised
> > some concern here:
> >
> > https://lkml.org/lkml/2011/4/13/554
> >
> > The discussion goes on and eventually I get to the current version
> > that looks most acceptable in the three options.
> Good point. I should have researched web (or my memory) more closely ;)
> Thanks for the pointer - it has reminded me why using PageDirty isn't quite
> perfect.
>
> > > For generic_perform_write() it doesn't really matter that much since we
> > > do things page-by-page anyway but other callers could be more efficient...
> >
> > That's right.
> You can add:
> Acked-by: Jan Kara <jack@suse.cz>
OK, thanks!
Fengguang
next prev parent reply other threads:[~2011-12-08 2:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 13:53 [PATCH 0/7] dirty throttling bits for 3.3 (v2) Wu Fengguang
2011-11-28 13:53 ` [PATCH 1/7] writeback: balanced_rate cannot exceed write bandwidth Wu Fengguang
2011-12-07 10:21 ` Jan Kara
2011-11-28 13:53 ` [PATCH 2/7] writeback: charge leaked page dirties to active tasks Wu Fengguang
2011-12-07 10:23 ` Jan Kara
2011-11-28 13:53 ` [PATCH 3/7] writeback: fix dirtied pages accounting on sub-page writes Wu Fengguang
2011-12-07 10:53 ` Jan Kara
2011-12-07 12:08 ` Wu Fengguang
2011-12-07 16:07 ` Jan Kara
2011-12-08 2:44 ` Wu Fengguang [this message]
2011-11-28 13:53 ` [PATCH 4/7] writeback: fix dirtied pages accounting on redirty Wu Fengguang
2011-12-07 16:09 ` Jan Kara
2011-11-28 13:53 ` [PATCH 5/7] btrfs: fix dirtied pages accounting on sub-page writes Wu Fengguang
2011-11-28 14:16 ` Wu Fengguang
2011-11-28 13:53 ` [PATCH 6/7] writeback: dirty ratelimit - think time compensation Wu Fengguang
2011-12-07 16:14 ` Jan Kara
2011-11-28 13:53 ` [PATCH 7/7] writeback: comment on the bdi dirty threshold Wu Fengguang
2011-12-07 10:57 ` Jan Kara
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=20111208024425.GA7717@localhost \
--to=fengguang.wu@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).