linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio_fs: Remove request addition to processing list
@ 2025-06-20 11:49 lirongqing
  2025-06-21  9:21 ` 答复: " Li,Rongqing
  0 siblings, 1 reply; 2+ messages in thread
From: lirongqing @ 2025-06-20 11:49 UTC (permalink / raw)
  To: vgoyal, stefanha, miklos, eperezma, virtualization, linux-fsdevel,
	linux-kernel
  Cc: Li RongQing

From: Li RongQing <lirongqing@baidu.com>

Since virtio_fs does not utilize the fuse_pqueue->processing list, we
can safely omit adding requests to this list. This change eliminates the
associated spin_lock operations, thereby improving performance.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 fs/fuse/virtio_fs.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 82afe78..7a598ea5 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -814,7 +814,6 @@ static void virtio_fs_requests_done_work(struct work_struct *work)
 {
 	struct virtio_fs_vq *fsvq = container_of(work, struct virtio_fs_vq,
 						 done_work);
-	struct fuse_pqueue *fpq = &fsvq->fud->pq;
 	struct virtqueue *vq = fsvq->vq;
 	struct fuse_req *req;
 	struct fuse_req *next;
@@ -827,9 +826,7 @@ static void virtio_fs_requests_done_work(struct work_struct *work)
 		virtqueue_disable_cb(vq);
 
 		while ((req = virtqueue_get_buf(vq, &len)) != NULL) {
-			spin_lock(&fpq->lock);
-			list_move_tail(&req->list, &reqs);
-			spin_unlock(&fpq->lock);
+			list_add_tail(&req->list, &reqs);
 		}
 	} while (!virtqueue_enable_cb(vq));
 	spin_unlock(&fsvq->lock);
@@ -1389,7 +1386,6 @@ static int virtio_fs_enqueue_req(struct virtio_fs_vq *fsvq,
 	unsigned int i;
 	int ret;
 	bool notify;
-	struct fuse_pqueue *fpq;
 
 	/* Does the sglist fit on the stack? */
 	total_sgs = sg_count_fuse_req(req);
@@ -1445,10 +1441,6 @@ static int virtio_fs_enqueue_req(struct virtio_fs_vq *fsvq,
 	}
 
 	/* Request successfully sent. */
-	fpq = &fsvq->fud->pq;
-	spin_lock(&fpq->lock);
-	list_add_tail(&req->list, fpq->processing);
-	spin_unlock(&fpq->lock);
 	set_bit(FR_SENT, &req->flags);
 	/* matches barrier in request_wait_answer() */
 	smp_mb__after_atomic();
-- 
2.9.4


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

* 答复: [PATCH] virtio_fs: Remove request addition to processing list
  2025-06-20 11:49 [PATCH] virtio_fs: Remove request addition to processing list lirongqing
@ 2025-06-21  9:21 ` Li,Rongqing
  0 siblings, 0 replies; 2+ messages in thread
From: Li,Rongqing @ 2025-06-21  9:21 UTC (permalink / raw)
  To: vgoyal@redhat.com, stefanha@redhat.com, miklos@szeredi.hu,
	eperezma@redhat.com, virtualization@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org


> Since virtio_fs does not utilize the fuse_pqueue->processing list, we can safely
> omit adding requests to this list. This change eliminates the associated
> spin_lock operations, thereby improving performance.
> 


please ignore this mail, sorry for the noise, I misunderstand 


-Li

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

end of thread, other threads:[~2025-06-21  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 11:49 [PATCH] virtio_fs: Remove request addition to processing list lirongqing
2025-06-21  9:21 ` 答复: " Li,Rongqing

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