linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Josef Bacik <josef@redhat.com>
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
	linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: mark page accessed before we write_end
Date: Thu, 2 Jul 2009 15:46:08 +0200	[thread overview]
Message-ID: <20090702134608.GH2714@wotan.suse.de> (raw)
In-Reply-To: <20090702130500.GF16713@dhcp231-156.rdu.redhat.com>

On Thu, Jul 02, 2009 at 09:05:00AM -0400, Josef Bacik wrote:
> Hello,
> 
> In testing a backport of the write_begin/write_end AOPs, a 10% re-read
> regression was noticed when running iozone.  This regression was introduced
> because the old AOPs would always do a mark_page_accessed(page) after the
> commit_write, but when the new AOPs where introduced, the only place this was
> kept was in pagecache_write_end().  This patch does the same thing in the
> generic case as what is done in pagecache_write_end(), which is just to mark
> the page accessed before we do write_end().  Thank you,
> 
> Signed-off-by: Josef Bacik <jbacik@redhat.com>

Nasty bug. I'm sure (without looking at history) it's my fault :(
Good catch, thanks.

Acked-by: Nick Piggin <npiggin@suse.de>

> ---
>  mm/filemap.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 2239671..ccea3b6 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2272,6 +2272,7 @@ again:
>  		pagefault_enable();
>  		flush_dcache_page(page);
>  
> +		mark_page_accessed(page);
>  		status = a_ops->write_end(file, mapping, pos, bytes, copied,
>  						page, fsdata);
>  		if (unlikely(status < 0))
> -- 
> 1.5.4.3

      reply	other threads:[~2009-07-02 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 13:05 [PATCH] mm: mark page accessed before we write_end Josef Bacik
2009-07-02 13:46 ` Nick Piggin [this message]

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=20090702134608.GH2714@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=josef@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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).