diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-12 00:14:42 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-01-12 00:14:42 -0500 |
commit | 7b21e34fd1c272e3a8c3846168f2f6287a4cd72b (patch) | |
tree | 0f94c9f834f5b7cd8ba87168df892ed17b09cb8f /tools/virtio | |
parent | e343a895a9f342f239c5e3c5ffc6c0b1707e6244 (diff) |
virtio: harsher barriers for rpmsg.
We were cheating with our barriers; using the smp ones rather than the
real device ones. That was fine, until rpmsg came along, which is
used to talk to a real device (a non-SMP CPU).
Unfortunately, just putting back the real barriers (reverting
d57ed95d) causes a performance regression on virtio-pci. In
particular, Amos reports netbench's TCP_RR over virtio_net CPU
utilization increased up to 35% while throughput went down by up to
14%.
By comparison, this branch is in the noise.
Reference: https://lkml.org/lkml/2011/12/11/22
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools/virtio')
-rw-r--r-- | tools/virtio/linux/virtio.h | 1 | ||||
-rw-r--r-- | tools/virtio/virtio_test.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h index 669bcdd45805..953db2abf6b9 100644 --- a/tools/virtio/linux/virtio.h +++ b/tools/virtio/linux/virtio.h | |||
@@ -214,6 +214,7 @@ void *virtqueue_detach_unused_buf(struct virtqueue *vq); | |||
214 | struct virtqueue *vring_new_virtqueue(unsigned int num, | 214 | struct virtqueue *vring_new_virtqueue(unsigned int num, |
215 | unsigned int vring_align, | 215 | unsigned int vring_align, |
216 | struct virtio_device *vdev, | 216 | struct virtio_device *vdev, |
217 | bool weak_barriers, | ||
217 | void *pages, | 218 | void *pages, |
218 | void (*notify)(struct virtqueue *vq), | 219 | void (*notify)(struct virtqueue *vq), |
219 | void (*callback)(struct virtqueue *vq), | 220 | void (*callback)(struct virtqueue *vq), |
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 74d3331bdaf9..0740284396c1 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c | |||
@@ -92,7 +92,8 @@ static void vq_info_add(struct vdev_info *dev, int num) | |||
92 | assert(r >= 0); | 92 | assert(r >= 0); |
93 | memset(info->ring, 0, vring_size(num, 4096)); | 93 | memset(info->ring, 0, vring_size(num, 4096)); |
94 | vring_init(&info->vring, num, info->ring, 4096); | 94 | vring_init(&info->vring, num, info->ring, 4096); |
95 | info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, info->ring, | 95 | info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, |
96 | true, info->ring, | ||
96 | vq_notify, vq_callback, "test"); | 97 | vq_notify, vq_callback, "test"); |
97 | assert(info->vq); | 98 | assert(info->vq); |
98 | info->vq->priv = info; | 99 | info->vq->priv = info; |