netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] vhost-vsock: remove unused vq variable
@ 2016-12-07  9:52 Peng Tao
  2016-12-07  9:52 ` [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue Peng Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peng Tao @ 2016-12-07  9:52 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: kvm, virtualization, netdev, Peng Tao

Signed-off-by: Peng Tao <bergwolf@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

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

* [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue
  2016-12-07  9:52 [PATCH 1/2] vhost-vsock: remove unused vq variable Peng Tao
@ 2016-12-07  9:52 ` Peng Tao
  2016-12-07 13:10   ` Stefan Hajnoczi
  2016-12-08 16:30   ` David Miller
  2016-12-07 13:10 ` [PATCH 1/2] vhost-vsock: remove unused vq variable Stefan Hajnoczi
  2016-12-08 16:30 ` David Miller
  2 siblings, 2 replies; 6+ messages in thread
From: Peng Tao @ 2016-12-07  9:52 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: kvm, virtualization, netdev, Peng Tao

test_and_set_bit() already implies a memory barrier.

Signed-off-by: Peng Tao <bergwolf@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

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

* Re: [PATCH 1/2] vhost-vsock: remove unused vq variable
  2016-12-07  9:52 [PATCH 1/2] vhost-vsock: remove unused vq variable Peng Tao
  2016-12-07  9:52 ` [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue Peng Tao
@ 2016-12-07 13:10 ` Stefan Hajnoczi
  2016-12-08 16:30 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2016-12-07 13:10 UTC (permalink / raw)
  To: Peng Tao; +Cc: Stefan Hajnoczi, kvm, virtualization, netdev

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On Wed, Dec 07, 2016 at 05:52:18PM +0800, Peng Tao wrote:
> Signed-off-by: Peng Tao <bergwolf@gmail.com>
> ---
>  drivers/vhost/vsock.c | 3 ---
>  1 file changed, 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

* Re: [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue
  2016-12-07  9:52 ` [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue Peng Tao
@ 2016-12-07 13:10   ` Stefan Hajnoczi
  2016-12-08 16:30   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2016-12-07 13:10 UTC (permalink / raw)
  To: Peng Tao; +Cc: netdev, kvm, Stefan Hajnoczi, virtualization


[-- Attachment #1.1: Type: text/plain, Size: 311 bytes --]

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@gmail.com>
> ---
>  drivers/vhost/vhost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

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

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

* Re: [PATCH 1/2] vhost-vsock: remove unused vq variable
  2016-12-07  9:52 [PATCH 1/2] vhost-vsock: remove unused vq variable Peng Tao
  2016-12-07  9:52 ` [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue Peng Tao
  2016-12-07 13:10 ` [PATCH 1/2] vhost-vsock: remove unused vq variable Stefan Hajnoczi
@ 2016-12-08 16:30 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-12-08 16:30 UTC (permalink / raw)
  To: bergwolf; +Cc: stefanha, kvm, virtualization, netdev

From: Peng Tao <bergwolf@gmail.com>
Date: Wed,  7 Dec 2016 17:52:18 +0800

> Signed-off-by: Peng Tao <bergwolf@gmail.com>

Applied.

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

* Re: [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue
  2016-12-07  9:52 ` [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue Peng Tao
  2016-12-07 13:10   ` Stefan Hajnoczi
@ 2016-12-08 16:30   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2016-12-08 16:30 UTC (permalink / raw)
  To: bergwolf; +Cc: stefanha, kvm, virtualization, netdev

From: Peng Tao <bergwolf@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@gmail.com>

Applied.

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

end of thread, other threads:[~2016-12-08 16:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07  9:52 [PATCH 1/2] vhost-vsock: remove unused vq variable Peng Tao
2016-12-07  9:52 ` [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue Peng Tao
2016-12-07 13:10   ` Stefan Hajnoczi
2016-12-08 16:30   ` David Miller
2016-12-07 13:10 ` [PATCH 1/2] vhost-vsock: remove unused vq variable Stefan Hajnoczi
2016-12-08 16:30 ` David Miller

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