linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jeff.layton@primarydata.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: linux-nfs@vger.kernel.org, Jeff Layton <jlayton@primarydata.com>
Subject: Re: [PATCH] NFS: Fix a write performance regression
Date: Thu, 1 Oct 2015 19:23:15 -0400	[thread overview]
Message-ID: <20151001192315.02be2dee@tlielax.poochiereds.net> (raw)
In-Reply-To: <1443741146-21816-1-git-send-email-trond.myklebust@primarydata.com>

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>

      reply	other threads:[~2015-10-01 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 23:12 [PATCH] NFS: Fix a write performance regression Trond Myklebust
2015-10-01 23:23 ` Jeff Layton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151001192315.02be2dee@tlielax.poochiereds.net \
    --to=jeff.layton@primarydata.com \
    --cc=jlayton@primarydata.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).