[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250615132039.2051-1-lirongqing@baidu.com>
Date: Sun, 15 Jun 2025 21:20:39 +0800
From: lirongqing <lirongqing@...du.com>
To: <vgoyal@...hat.com>, <stefanha@...hat.com>, <miklos@...redi.hu>,
<eperezma@...hat.com>, <virtualization@...ts.linux.dev>,
<linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Li RongQing <lirongqing@...du.com>
Subject: [PATCH][v2] virtio_fs: Remove redundant spinlock in virtio_fs_request_complete()
From: Li RongQing <lirongqing@...du.com>
Since clear_bit is an atomic operation, the spinlock is redundant and
can be removed, reducing lock contention is good for performance.
Signed-off-by: Li RongQing <lirongqing@...du.com>
---
Diff with v1: remove unused variable "fpq"
fs/fuse/virtio_fs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 53c2626..b8a99d3 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -762,7 +762,6 @@ static void copy_args_from_argbuf(struct fuse_args *args, struct fuse_req *req)
static void virtio_fs_request_complete(struct fuse_req *req,
struct virtio_fs_vq *fsvq)
{
- struct fuse_pqueue *fpq = &fsvq->fud->pq;
struct fuse_args *args;
struct fuse_args_pages *ap;
unsigned int len, i, thislen;
@@ -791,9 +790,7 @@ static void virtio_fs_request_complete(struct fuse_req *req,
}
}
- spin_lock(&fpq->lock);
clear_bit(FR_SENT, &req->flags);
- spin_unlock(&fpq->lock);
fuse_request_end(req);
spin_lock(&fsvq->lock);
--
2.9.4
Powered by blists - more mailing lists