lkml.org 
[lkml]   [2009]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] mm: mark page accessed before we write_end
    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


    \
     
     \ /
      Last update: 2009-07-02 15:49    [W:0.020 / U:15.596 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site