virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fuse: avoid unnecessary spinlock bump
@ 2022-04-02 10:32 Jeffle Xu
  2022-04-04  8:49 ` Stefan Hajnoczi
  2022-04-07 14:10 ` Vivek Goyal
  0 siblings, 2 replies; 12+ messages in thread
From: Jeffle Xu @ 2022-04-02 10:32 UTC (permalink / raw)
  To: miklos, vgoyal, stefanha, virtualization, linux-fsdevel; +Cc: gerry

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>
---
 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

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-04-13  3:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
     [not found]                 ` <afc2f1ec-8aff-35fa-5fde-75852db7b4a8@fastmail.fm>
2022-04-11 14:00                   ` Vivek Goyal
2022-04-13  3:09                     ` JeffleXu

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).