From: David Chinner <dgc@sgi.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>,
David Howells <dhowells@redhat.com>, Dave Chinner <dgc@sgi.com>,
Trond Myklebust <trond.myklebust@fys.uio.no>,
mark.fasheh@oracle.com, hugh <hugh@veritas.com>,
stable <stable@kernel.org>
Subject: Re: [PATCH] mm: set_page_dirty_balance() vs ->page_mkwrite()
Date: Tue, 9 Oct 2007 09:36:37 +1000 [thread overview]
Message-ID: <20071008233637.GF995458@sgi.com> (raw)
In-Reply-To: <200710081637.01122.nickpiggin@yahoo.com.au>
On Mon, Oct 08, 2007 at 04:37:00PM +1000, Nick Piggin wrote:
> On Tuesday 09 October 2007 02:54, Peter Zijlstra wrote:
> > It seems that with the recent usage of ->page_mkwrite() a little detail
> > was overlooked.
> >
> > .22-rc1 merged OCFS2 usage of this hook
> > .23-rc1 merged XFS usage
> > .24-rc1 will most likely merge NFS usage
> >
> > Please consider this for .23 final and maybe even .22.x
> >
> > ---
> > Subject: mm: set_page_dirty_balance() vs ->page_mkwrite()
> >
> > All the current page_mkwrite() implementations also set the page dirty.
> > Which results in the set_page_dirty_balance() call to _not_ call balance,
> > because the page is already found dirty.
> >
> > This allows us to dirty a _lot_ of pages without ever hitting
> > balance_dirty_pages(). Not good (tm).
> >
> > Force a balance call if ->page_mkwrite() was successful.
>
> Would it be better to just have the callers set_page_dirty_balance()?
block_page_mkwrite() is just using generic interfaces to do this,
same as pretty much any write() system call. The idea was to make it
as similar to the write() call path as possible...
However, unlike generic_file_buffered_write(), we are not calling
balance_dirty_pages_ratelimited(mapping) between
->prepare/commit_write call pairs. Perhaps this should be added to
block_page_mkwrite() after the page is unlocked....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2007-10-08 23:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 16:54 [PATCH] mm: set_page_dirty_balance() vs ->page_mkwrite() Peter Zijlstra
2007-10-08 6:37 ` Nick Piggin
2007-10-08 23:36 ` David Chinner [this message]
2007-10-08 7:47 ` Nick Piggin
2007-10-09 2:12 ` Mark Fasheh
2007-10-08 14:50 ` Nick Piggin
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=20071008233637.GF995458@sgi.com \
--to=dgc@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.fasheh@oracle.com \
--cc=nickpiggin@yahoo.com.au \
--cc=peterz@infradead.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=trond.myklebust@fys.uio.no \
/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