From: Josef Bacik <josef@redhat.com> Date: Thu, 2 Jul 2009 09:09:41 -0400 Subject: [mm] fix re-read performance regression Message-id: 20090702130941.GG16713@dhcp231-156.rdu.redhat.com O-Subject: Re: [PATCH RHEL5.4] fix re-read performance regression UPDATED Bugzilla: 506511 RH-Acked-by: Eric Sandeen <sandeen@redhat.com> On Tue, Jun 30, 2009 at 02:33:48PM -0400, Josef Bacik wrote: > Hello, > > This is in reference to bz 506511. The performance team noticed that there was > a 10% regression in re-read on one of their iozone tests. This is because of > the new aops patches, specifically the one that converted ext3 over to use the > new aops. When doing the write_end, we are supposed to unlock_page() and > page_cache_release() the page. We also should be doing mark_page_accessed() so > the page does not get flushed to disk too hastily. Ext3 was not doing this, and > still isn't so there is no upstream reference for this yet (I will be sending a > patch upstream shortly). This patch makes sure the pages are marked as accessed > when we exit write_end. This has been tested with the iozone test and the > regression is no longer seen. Thank you, > Hello, After talking with Nick Piggin we've come up with a better way to fix the problem, and this will handle everybody who uses the new AOPs. Please take this patch instead. Thank you, Josef diff --git a/mm/filemap.c b/mm/filemap.c index 44661d7..6204c0f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2566,6 +2566,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))