* [PATCH] NFS: Fix a write performance regression
@ 2015-10-01 23:12 Trond Myklebust
2015-10-01 23:23 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: Trond Myklebust @ 2015-10-01 23:12 UTC (permalink / raw)
To: linux-nfs; +Cc: Jeff Layton
If all other conditions in nfs_can_extend_write() are met, and there
are no locks, then we should be able to assume close-to-open semantics
and the ability to extend our write to cover the whole page.
With this patch, the xfstests generic/074 test completes in 232s instead
of >1400s on my test rig.
Fixes: bd61e0a9c852 ("locks: convert posix locks to file_lock_context")
Cc: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
fs/nfs/write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 72624dc4a623..1d6f6b43b7f4 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1223,7 +1223,7 @@ static int nfs_can_extend_write(struct file *file, struct page *page, struct ino
return 1;
if (!flctx || (list_empty_careful(&flctx->flc_flock) &&
list_empty_careful(&flctx->flc_posix)))
- return 0;
+ return 1;
/* Check to see if there are whole file write locks */
ret = 0;
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFS: Fix a write performance regression
2015-10-01 23:12 [PATCH] NFS: Fix a write performance regression Trond Myklebust
@ 2015-10-01 23:23 ` Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2015-10-01 23:23 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-nfs, Jeff Layton
On Thu, 1 Oct 2015 19:12:26 -0400
Trond Myklebust <trond.myklebust@primarydata.com> wrote:
> If all other conditions in nfs_can_extend_write() are met, and there
> are no locks, then we should be able to assume close-to-open semantics
> and the ability to extend our write to cover the whole page.
>
> With this patch, the xfstests generic/074 test completes in 232s instead
> of >1400s on my test rig.
>
> Fixes: bd61e0a9c852 ("locks: convert posix locks to file_lock_context")
> Cc: Jeff Layton <jlayton@primarydata.com>
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
> ---
> fs/nfs/write.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
> index 72624dc4a623..1d6f6b43b7f4 100644
> --- a/fs/nfs/write.c
> +++ b/fs/nfs/write.c
> @@ -1223,7 +1223,7 @@ static int nfs_can_extend_write(struct file *file, struct page *page, struct ino
> return 1;
> if (!flctx || (list_empty_careful(&flctx->flc_flock) &&
> list_empty_careful(&flctx->flc_posix)))
> - return 0;
> + return 1;
>
> /* Check to see if there are whole file write locks */
> ret = 0;
Ouch -- mea culpa. Actually broken originally in
5263e31e452fb84138b9bee061d5c06c0f359fea, I think...
In any case:
Reviewed-by: Jeff Layton <jeff.layton@primarydata.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-01 23:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 23:12 [PATCH] NFS: Fix a write performance regression Trond Myklebust
2015-10-01 23:23 ` Jeff Layton
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).