Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 0c23b55..3e01d58 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -195,7 +195,6 @@ static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { struct vhost_vsock *vsock; - struct vhost_virtqueue *vq; int len = pkt->len; /* Find the vhost_vsock according to guest context id */ @@ -205,8 +204,6 @@ vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) return -ENODEV; } - vq = &vsock->vqs[VSOCK_VQ_RX]; - if (pkt->reply) atomic_inc(&vsock->queued_replies); -- 2.7.4
Peng Tao
2016-Dec-07 09:52 UTC
[PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue
test_and_set_bit() already implies a memory barrier. Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index c6f2d89..2663543 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -261,8 +261,8 @@ void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work) if (!test_and_set_bit(VHOST_WORK_QUEUED, &work->flags)) { /* We can only add the work to the list after we're * sure it was not in the list. + * test_and_set_bit() implies a memory barrier. */ - smp_mb(); llist_add(&work->node, &dev->work_list); wake_up_process(dev->worker); } -- 2.7.4
On Wed, Dec 07, 2016 at 05:52:18PM +0800, Peng Tao wrote:> Signed-off-by: Peng Tao <bergwolf at gmail.com> > --- > drivers/vhost/vsock.c | 3 --- > 1 file changed, 3 deletions(-)Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20161207/08d93265/attachment.sig>
Stefan Hajnoczi
2016-Dec-07 13:10 UTC
[PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue
On Wed, Dec 07, 2016 at 05:52:19PM +0800, Peng Tao wrote:> test_and_set_bit() already implies a memory barrier. > > Signed-off-by: Peng Tao <bergwolf at gmail.com> > --- > drivers/vhost/vhost.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20161207/d0029c71/attachment.sig>
From: Peng Tao <bergwolf at gmail.com> Date: Wed, 7 Dec 2016 17:52:18 +0800> Signed-off-by: Peng Tao <bergwolf at gmail.com>Applied.
David Miller
2016-Dec-08 16:30 UTC
[PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue
From: Peng Tao <bergwolf at gmail.com> Date: Wed, 7 Dec 2016 17:52:19 +0800> test_and_set_bit() already implies a memory barrier. > > Signed-off-by: Peng Tao <bergwolf at gmail.com>Applied.
Maybe Matching Threads
- [PATCH 1/2] vhost-vsock: remove unused vq variable
- [PATCH 0/4] vsock: cancel connect packets when failing to connect
- [PATCH 0/4] vsock: cancel connect packets when failing to connect
- [PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls
- [PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls