diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-20 09:14:26 +0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-20 09:14:53 +0400 |
commit | e538ebaf78455ff87dec2c34d4f9c128844e3f3f (patch) | |
tree | 1f464016f21f575cdb6ece7940a6ef868438133f /tools/virtio/linux | |
parent | 282edb36499042a92b71f052f51754ae7ed936e4 (diff) | |
download | linux-e538ebaf78455ff87dec2c34d4f9c128844e3f3f.tar.xz |
tools/virtio: make vringh_test use inbuf/outbuf.
As expected, the simplified accessors are faster.
for i in `seq 50`; do /usr/bin/time -f 'Wall time:%e' ./vringh_test --indirect --eventidx --parallel --fast-vringh; done 2>&1 | stats --trim-outliers:
Before:
Using CPUS 0 and 3
Guest: notified 0, pinged 39062-39063(39063)
Host: notified 39062-39063(39063), pinged 0
Wall time:1.760000-2.220000(1.789167)
After:
Using CPUS 0 and 3
Guest: notified 0, pinged 39037-39063(39062)
Host: notified 39037-39063(39062), pinged 0
Wall time:1.640000-1.810000(1.676875)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools/virtio/linux')
-rw-r--r-- | tools/virtio/linux/virtio.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h index 5fa612ad932c..6df181a6bcc6 100644 --- a/tools/virtio/linux/virtio.h +++ b/tools/virtio/linux/virtio.h @@ -63,6 +63,16 @@ int virtqueue_add_sgs(struct virtqueue *vq, void *data, gfp_t gfp); +int virtqueue_add_outbuf(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp); + +int virtqueue_add_inbuf(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp); + void virtqueue_kick(struct virtqueue *vq); void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len); |