linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Jeffle Xu <jefflexu@linux.alibaba.com>
Cc: miklos@szeredi.hu, stefanha@redhat.com,
	virtualization@lists.linux-foundation.org,
	linux-fsdevel@vger.kernel.org, gerry@linux.alibaba.com
Subject: Re: [PATCH] fuse: avoid unnecessary spinlock bump
Date: Thu, 7 Apr 2022 10:10:56 -0400	[thread overview]
Message-ID: <Yk7w8L1f/yik+qrR@redhat.com> (raw)
In-Reply-To: <20220402103250.68027-1-jefflexu@linux.alibaba.com>

On Sat, Apr 02, 2022 at 06:32:50PM +0800, Jeffle Xu wrote:
> Move dmap free worker kicker inside the critical region, so that extra
> spinlock lock/unlock could be avoided.
> 
> Suggested-by: Liu Jiang <gerry@linux.alibaba.com>
> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>

Looks good to me. Have you done any testing to make sure nothing is
broken.

Reviewed-by: Vivek Goyal <vgoyal@redhat.com>

Vivek

> ---
>  fs/fuse/dax.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
> index d7d3a7f06862..b9f8795d52c4 100644
> --- a/fs/fuse/dax.c
> +++ b/fs/fuse/dax.c
> @@ -138,9 +138,9 @@ static struct fuse_dax_mapping *alloc_dax_mapping(struct fuse_conn_dax *fcd)
>  		WARN_ON(fcd->nr_free_ranges <= 0);
>  		fcd->nr_free_ranges--;
>  	}
> +	__kick_dmap_free_worker(fcd, 0);
>  	spin_unlock(&fcd->lock);
>  
> -	kick_dmap_free_worker(fcd, 0);
>  	return dmap;
>  }
>  
> -- 
> 2.27.0
> 


  parent reply	other threads:[~2022-04-07 14:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02 10:32 [PATCH] fuse: avoid unnecessary spinlock bump Jeffle Xu
2022-04-04  8:49 ` Stefan Hajnoczi
2022-04-07 14:10 ` Vivek Goyal [this message]
2022-04-08  2:36   ` JeffleXu
2022-04-08 11:25     ` Vivek Goyal
2022-04-08 11:50       ` JeffleXu
2022-04-08 12:06         ` Vivek Goyal
2022-04-11  2:10           ` JeffleXu
2022-04-11 11:52             ` Vivek Goyal
2022-04-11 11:54               ` JeffleXu
2022-04-11 13:20                 ` Bernd Schubert
2022-04-11 14:00                   ` Vivek Goyal
2022-04-13  3:09                     ` JeffleXu
2022-04-22 13:36 ` Miklos Szeredi

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=Yk7w8L1f/yik+qrR@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=gerry@linux.alibaba.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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).