[PATCH] virtio_fs: Remove request addition to processing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Li RongQing <lirongqing@xxxxxxxxx>

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





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux