[PATCH] tools/virtio: add ringtest utilities

2016-01-21 Thread Michael S. Tsirkin
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

virtio ring layout changes for optimal single-stream performance

2016-01-21 Thread Michael S. Tsirkin
Hi all! I have been experimenting with alternative virtio ring layouts, in order to speed up single stream performance. I have just posted a benchmark I wrote for the purpose, and a (partial) alternative layout implementation. This achieves 20-40% reduction in virtio overhead in the (default)

[PATCH] sh: fix smp_store_mb for !SMP

2016-01-21 Thread Michael S. Tsirkin
sh variant of smp_store_mb() calls xchg() on !SMP which is stronger than implied by both the name and the documentation. commit 90a3ccb0be538a914e6a5c51ae919762261563ad ("sh: define __smp_xxx, fix smp_store_mb for !SMP") was supposed to fix it but left the bug in place. Drop smp_store_mb, so

Re: virtio pull for 4.5 (was Re: [PULL] virtio: barrier rework+fixes)

2016-01-21 Thread Michael S. Tsirkin
On Mon, Jan 18, 2016 at 05:01:26PM -0800, Linus Torvalds wrote: > On Mon, Jan 18, 2016 at 5:21 AM, Michael S. Tsirkin wrote: > > Hi Linus, > > Just making sure nothing's wrong with this pull request. > > If there's an issue, pls let me know! > > It was just pulled because I

Re: [PATCH 1/2] vhost: helpers to enable/disable vring endianness

2016-01-21 Thread Cornelia Huck
On Wed, 13 Jan 2016 18:09:41 +0100 Greg Kurz wrote: > The default use case for vhost is when the host and the vring have the > same endianness (default native endianness). But there are cases where > they differ and vhost should byteswap when accessing the vring: > -

Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-01-21 Thread Cornelia Huck
On Wed, 13 Jan 2016 18:09:47 +0100 Greg Kurz wrote: > The way vring endianness is being handled currently obfuscates > the code in vhost_init_used(). > > This patch tries to fix that by doing the following: > - move the the code that adjusts endianness to a dedicated

Re: virtio ring layout changes for optimal single-stream performance

2016-01-21 Thread Cornelia Huck
On Thu, 21 Jan 2016 15:39:26 +0200 "Michael S. Tsirkin" wrote: > Hi all! > I have been experimenting with alternative virtio ring layouts, > in order to speed up single stream performance. > > I have just posted a benchmark I wrote for the purpose, and a (partial) > alternative

Re: virtio ring layout changes for optimal single-stream performance

2016-01-21 Thread Michael S. Tsirkin
On Thu, Jan 21, 2016 at 04:38:36PM +0100, Cornelia Huck wrote: > On Thu, 21 Jan 2016 15:39:26 +0200 > "Michael S. Tsirkin" wrote: > > > Hi all! > > I have been experimenting with alternative virtio ring layouts, > > in order to speed up single stream performance. > > > > I have

Re: [PATCH V2 3/3] vhost_net: basic polling support

2016-01-21 Thread Jason Wang
On 01/20/2016 10:35 PM, Michael S. Tsirkin wrote: > On Tue, Dec 01, 2015 at 02:39:45PM +0800, Jason Wang wrote: >> This patch tries to poll for new added tx buffer or socket receive >> queue for a while at the end of tx/rx processing. The maximum time >> spent on polling were specified through a

Re: [PATCH V2 2/3] vhost: introduce vhost_vq_more_avail()

2016-01-21 Thread Jason Wang
On 01/20/2016 10:09 PM, Michael S. Tsirkin wrote: > On Tue, Dec 01, 2015 at 02:39:44PM +0800, Jason Wang wrote: >> Signed-off-by: Jason Wang > Wow new API with no comments anywhere, and no > commit log to say what it's good for. > Want to know what it does and whether >