aboutsummaryrefslogtreecommitdiffstats
path: root/tools/virtio/ringtest (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-05-09ptr_ring: support testing different batching sizesMichael S. Tsirkin1-0/+3
Use the param flag for that. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-05-09ringtest: support test specific parametersMichael S. Tsirkin2-0/+15
Add a new flag for passing test-specific parameters. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-05-02ringtest: fix an assert statementDan Carpenter1-1/+1
There is an || vs && typo so the assert can never be triggered. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
2017-01-19tools/virtio/ringtest: tweaks for s390Halil Pasic1-0/+12
Make ringtest work on s390 too. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Acked-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-01-19tools/virtio/ringtest: fix run-on-all.sh for offline cpusHalil Pasic1-2/+3
Since ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu") run-on-all.sh uses seq 0 $HOST_AFFINITY as the list of ids of the CPUs to run the command on (assuming ids of online CPUs are consecutive and start from 0), where $HOST_AFFINITY is the highest CPU id in the system previously determined using lscpu. This can fail on systems with offline CPUs. Instead let's use lscpu to determine the list of online CPUs. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Fixes: ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu") Reviewed-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2016-10-31ringtest: poll for new buffers once before updating event indexPaolo Bonzini1-2/+2
Updating the event index has a memory barrier and causes more work on the other side to actually signal the event. It is unnecessary if a new buffer has already appeared on the ring, so poll once before doing the update. The effect of this on the 0.9 ring implementation is pretty much invisible, but on the new-style ring it provides a consistent 3% performance improvement. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-10-31ringtest: commonize implementation of poll_avail/poll_usedPaolo Bonzini6-83/+43
Provide new primitives used_empty/avail_empty and build poll_avail/poll_used on top of it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-10-31ringtest: use link-time optimizationPaolo Bonzini2-4/+4
By using -flto and -fwhole-program, all functions from the ring implementation can be treated as static and possibly inlined. Force this to happen through the GCC flatten attribute. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-08-15ringtest: test build fixMichael S. Tsirkin1-0/+1
Recent changes to ptr_ring broke the ringtest which lacks a likely() stub. Fix it up. Fixes: 982fb490c298896d15e9323a882f34a57c11ff56 ("ptr_ring: support zero length ring") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-07-01ptr_ring: support resizing multiple queuesMichael S. Tsirkin1-0/+5
Sometimes, we need support resizing multiple queues at once. This is because it was not easy to recover to recover from a partial failure of multiple queues resizing. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller4-3/+78
Several cases of overlapping changes, except the packet scheduler conflicts which deal with the addition of the free list parameter to qdisc_enqueue(). Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15ptr_ring: ring testMichael S. Tsirkin2-1/+196
Add ringtest based unit test for ptr ring. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-06tools/virtio: add noring toolMichael S. Tsirkin2-1/+72
Useful to measure testing framework overhead. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-06-06tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpuMike Rapoport1-2/+2
/dev/cpu is only available on x86 with certain modules (e.g. msr) enabled. Using lscpu to get processors count is more portable. Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-06-06tools/virtio/ringtest: add usage example to READMEMike Rapoport1-0/+4
Having typical usage example in the README file is more convinient than in the git history... Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-05-22ringtest: pass buf != NULLMichael S. Tsirkin1-1/+1
just a stub pointer for now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-05-22virtio: add inorder optionMichael S. Tsirkin3-2/+54
skips ring accesses but drops out of order support Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-01-26tools/virtio: add ringtest utilitiesMichael S. Tsirkin8-0/+1123
This adds micro-benchmarks useful for tuning virtio ring layouts. Three layouts are currently implemented: - virtio 0.9 compatible one - an experimental extension bypassing the ring index, polling ring itself instead - an experimental extension bypassing avail and used ring completely Typical use: sh run-on-all.sh perf stat -r 10 --log-fd 1 -- ./ring It doesn't depend on the kernel directly, but it's handy to have as much virtio stuff as possible in one tree. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>