]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix writeback performance issue on cache invalidation
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 5 Aug 2013 17:26:31 +0000 (13:26 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 7 Aug 2013 21:07:40 +0000 (17:07 -0400)
commit26c8a3e4a24859a7ea4d3e17df75238c489dd8ae
tree6ac028b704a1f3c78f7dc98cc5fbf1de5e3a543c
parentedd6e9a104d5722f8d97e27e7d8ef43484c2ea99
NFS: Fix writeback performance issue on cache invalidation

If a cache invalidation is triggered, and we happen to have a lot of
writebacks cached at the time, then the call to invalidate_inode_pages2()
will end up calling ->launder_page() on each and every dirty page in order
to sync its contents to disk, thus defeating write coalescing.
The following patch ensures that we try to sync the inode to disk before
calling invalidate_inode_pages2() so that we do the writeback as efficiently
as possible.

Reported-by: William Dauchy <william@gandi.net>
Reported-by: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: William Dauchy <william@gandi.net>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
fs/nfs/inode.c