Skip to content

Commit

Permalink
mm: mark page accessed before we write_end()
Browse files Browse the repository at this point in the history
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().

Signed-off-by: Josef Bacik <[email protected]>
Acked-by: Nick Piggin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Josef Bacik authored and torvalds committed Jul 6, 2009
1 parent a65e7bf commit c8236db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,7 @@ static ssize_t generic_perform_write(struct file *file,
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))
Expand Down

0 comments on commit c8236db

Please sign in to comment.