Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-12-06 Thread Avi Kivity
On 12/01/2010 11:34 PM, Stefan Hajnoczi wrote: The guest CPU utilization numbers include an efficiency metric: %vcpu per MB/sec. Here we see significant improvements too. Guests that previously couldn't get more CPU work done now have regained some breathing space. Thanks for those

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-12-01 Thread Stefan Hajnoczi
On Mon, Nov 15, 2010 at 11:20 AM, Stefan Hajnoczi stefa...@gmail.com wrote: On Sun, Nov 14, 2010 at 12:19 PM, Avi Kivity a...@redhat.com wrote: On 11/14/2010 01:05 PM, Avi Kivity wrote: I agree, but let's enable virtio-ioeventfd carefully because bad code is out there. Sure.  Note as long

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-12-01 Thread Avi Kivity
On 12/01/2010 01:44 PM, Stefan Hajnoczi wrote: And, what about efficiency? As in bits/cycle? We are running benchmarks with this latest patch and will report results. Full results here (thanks to Khoa Huynh): http://wiki.qemu.org/Features/VirtioIoeventfd The host CPU utilization is

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-12-01 Thread Stefan Hajnoczi
On Wed, Dec 1, 2010 at 12:30 PM, Avi Kivity a...@redhat.com wrote: On 12/01/2010 01:44 PM, Stefan Hajnoczi wrote:  And, what about efficiency?  As in bits/cycle?  We are running benchmarks with this latest patch and will report results. Full results here (thanks to Khoa Huynh):

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-15 Thread Stefan Hajnoczi
On Sun, Nov 14, 2010 at 12:19 PM, Avi Kivity a...@redhat.com wrote: On 11/14/2010 01:05 PM, Avi Kivity wrote: I agree, but let's enable virtio-ioeventfd carefully because bad code is out there. Sure.  Note as long as the thread waiting on ioeventfd doesn't consume too much cpu, it will

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-14 Thread Avi Kivity
On 11/12/2010 11:20 AM, Stefan Hajnoczi wrote: Who guarantees that less common virtio-blk and virtio-net guest drivers for non-Linux OSes are fine with it? Maybe you should add a feature flag that the guest has to ACK to enable it. Virtio-blk and virtio-net are fine. Both of those

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-14 Thread Stefan Hajnoczi
On Sun, Nov 14, 2010 at 10:34 AM, Avi Kivity a...@redhat.com wrote: On 11/12/2010 11:20 AM, Stefan Hajnoczi wrote:  Who guarantees that less common virtio-blk and virtio-net guest drivers  for non-Linux OSes are fine with it?  Maybe you should add a feature flag  that the guest has to

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-14 Thread Avi Kivity
On 11/14/2010 12:37 PM, Stefan Hajnoczi wrote: On Sun, Nov 14, 2010 at 10:34 AM, Avi Kivitya...@redhat.com wrote: On 11/12/2010 11:20 AM, Stefan Hajnoczi wrote: Who guarantees that less common virtio-blk and virtio-net guest drivers for non-Linux OSes are fine with it? Maybe you

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-14 Thread Avi Kivity
On 11/14/2010 01:05 PM, Avi Kivity wrote: I agree, but let's enable virtio-ioeventfd carefully because bad code is out there. Sure. Note as long as the thread waiting on ioeventfd doesn't consume too much cpu, it will awaken quickly and we won't have the transaction per timeslice effect.

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-12 Thread Stefan Hajnoczi
On Thu, Nov 11, 2010 at 3:53 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: Care must be taken not to interfere with vhost-net, which already uses ioeventfd host notifiers.  The following list shows the behavior implemented in

Re: [Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-12 Thread Stefan Hajnoczi
On Thu, Nov 11, 2010 at 4:45 PM, Christoph Hellwig h...@infradead.org wrote: On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: Some virtio devices are known to have guest drivers which expect a notify to be processed synchronously and spin waiting for completion.  Only enable

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-12 Thread Michael S. Tsirkin
On Fri, Nov 12, 2010 at 09:18:48AM +, Stefan Hajnoczi wrote: On Thu, Nov 11, 2010 at 3:53 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: Care must be taken not to interfere with vhost-net, which already uses ioeventfd host

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-12 Thread Stefan Hajnoczi
On Fri, Nov 12, 2010 at 9:25 AM, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Nov 12, 2010 at 09:18:48AM +, Stefan Hajnoczi wrote: On Thu, Nov 11, 2010 at 3:53 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: Care must be

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: Virtqueue notify is currently handled synchronously in userspace virtio. This prevents the vcpu from executing guest code while hardware emulation code handles the notify. On systems that support KVM, the ioeventfd mechanism

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Christoph Hellwig
On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: Some virtio devices are known to have guest drivers which expect a notify to be processed synchronously and spin waiting for completion. Only enable ioeventfd for virtio-blk and virtio-net for now. Who guarantees that less

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Avi Kivity
On 11/11/2010 03:47 PM, Stefan Hajnoczi wrote: Some virtio devices are known to have guest drivers which expect a notify to be processed synchronously and spin waiting for completion. Only enable ioeventfd for virtio-blk and virtio-net for now. Which drivers are these? I only know of the

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Gleb Natapov
On Thu, Nov 11, 2010 at 07:12:40PM +0200, Michael S. Tsirkin wrote: On Thu, Nov 11, 2010 at 06:59:29PM +0200, Avi Kivity wrote: On 11/11/2010 03:47 PM, Stefan Hajnoczi wrote: Some virtio devices are known to have guest drivers which expect a notify to be processed synchronously and spin

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2010 at 06:59:29PM +0200, Avi Kivity wrote: On 11/11/2010 03:47 PM, Stefan Hajnoczi wrote: Some virtio devices are known to have guest drivers which expect a notify to be processed synchronously and spin waiting for completion. Only enable ioeventfd for virtio-blk and