aboutsummaryrefslogtreecommitdiffstats
path: root/tools/virtio/vringh_test.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-03-20 01:14:26 -0400
committerRusty Russell <rusty@rustcorp.com.au>2013-03-20 01:14:53 -0400
commite538ebaf78455ff87dec2c34d4f9c128844e3f3f (patch)
tree1f464016f21f575cdb6ece7940a6ef868438133f /tools/virtio/vringh_test.c
parent282edb36499042a92b71f052f51754ae7ed936e4 (diff)
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/vringh_test.c')
-rw-r--r--tools/virtio/vringh_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c
index 6a48ca5c101f..bb0bd9403e9e 100644
--- a/tools/virtio/vringh_test.c
+++ b/tools/virtio/vringh_test.c
@@ -369,11 +369,11 @@ static int parallel_test(unsigned long features,
369 * user addr */ 369 * user addr */
370 __kmalloc_fake = indirects + (xfers % RINGSIZE) * 4; 370 __kmalloc_fake = indirects + (xfers % RINGSIZE) * 4;
371 if (output) 371 if (output)
372 err = virtqueue_add_buf(vq, sg, num_sg, 0, dbuf, 372 err = virtqueue_add_outbuf(vq, sg, num_sg, dbuf,
373 GFP_KERNEL); 373 GFP_KERNEL);
374 else 374 else
375 err = virtqueue_add_buf(vq, sg, 0, num_sg, dbuf, 375 err = virtqueue_add_inbuf(vq, sg, num_sg,
376 GFP_KERNEL); 376 dbuf, GFP_KERNEL);
377 377
378 if (err == -ENOSPC) { 378 if (err == -ENOSPC) {
379 if (!virtqueue_enable_cb_delayed(vq)) 379 if (!virtqueue_enable_cb_delayed(vq))