summaryrefslogtreecommitdiffstats
path: root/tools/virtio/ringtest
Commit message (Collapse)AuthorAgeFilesLines
* tools/virtio/ringtest: tweaks for s390Halil Pasic2017-01-191-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>
* tools/virtio/ringtest: fix run-on-all.sh for offline cpusHalil Pasic2017-01-191-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>
* ringtest: poll for new buffers once before updating event indexPaolo Bonzini2016-10-311-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>
* ringtest: commonize implementation of poll_avail/poll_usedPaolo Bonzini2016-10-316-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>
* ringtest: use link-time optimizationPaolo Bonzini2016-10-312-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>
* ringtest: test build fixMichael S. Tsirkin2016-08-151-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>
* ptr_ring: support resizing multiple queuesMichael S. Tsirkin2016-07-011-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>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2016-06-304-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>
| * tools/virtio: add noring toolMichael S. Tsirkin2016-06-062-1/+72
| | | | | | | | | | | | Useful to measure testing framework overhead. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpuMike Rapoport2016-06-061-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>
| * tools/virtio/ringtest: add usage example to READMEMike Rapoport2016-06-061-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>
* | ptr_ring: ring testMichael S. Tsirkin2016-06-152-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>
* ringtest: pass buf != NULLMichael S. Tsirkin2016-05-221-1/+1
| | | | | | just a stub pointer for now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio: add inorder optionMichael S. Tsirkin2016-05-223-2/+54
| | | | | | skips ring accesses but drops out of order support Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: add ringtest utilitiesMichael S. Tsirkin2016-01-268-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>
OpenPOWER on IntegriCloud