Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-11-10 Thread Stefan Hajnoczi
Hi Michael, I have looked into the way irqfd with msix mask notifiers works. From what I can tell, the guest notifiers are enabled by vhost net in order to hook up irqfds for the virtqueues. MSIX allows vectors to be masked so there is a mmio write notifier in qemu-kvm to toggle the irqfd and

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-25 Thread Stefan Hajnoczi
On Tue, Oct 19, 2010 at 03:33:41PM +0200, Michael S. Tsirkin wrote: Apologies if you receive this twice, the original message either disappeared or was delayed somehow. My main concern is with the fact that we add more state in notifiers that can easily get out of sync with users. If we

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-25 Thread Stefan Hajnoczi
On Tue, Oct 19, 2010 at 03:33:41PM +0200, Michael S. Tsirkin wrote: My main concern is with the fact that we add more state in notifiers that can easily get out of sync with users. If we absolutely need this state, let's try to at least document the state machine, and make the API for state

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-19 Thread Stefan Hajnoczi
On Thu, Sep 30, 2010 at 03:01:52PM +0100, 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

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-19 Thread Anthony Liguori
On 10/19/2010 08:07 AM, Stefan Hajnoczi wrote: Is there anything stopping this patch from being merged? Michael, any objections? If not, I'll merge it. Regards, Anthony Liguori Thanks, Stefan -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-19 Thread Michael S. Tsirkin
As a general comment, could you please try to split this patch up, to make it easier to review? I did a pass over it but I am still not understanding it completely. My main concern is with the fact that we add more state in notifiers that can easily get out of sync with users. If we absolutely

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-19 Thread Michael S. Tsirkin
On Tue, Oct 19, 2010 at 08:12:42AM -0500, Anthony Liguori wrote: On 10/19/2010 08:07 AM, Stefan Hajnoczi wrote: Is there anything stopping this patch from being merged? Michael, any objections? If not, I'll merge it. I don't really understand what's going on there. The extra state in

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-19 Thread Stefan Hajnoczi
On Tue, Oct 19, 2010 at 2:35 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Oct 19, 2010 at 08:12:42AM -0500, Anthony Liguori wrote: On 10/19/2010 08:07 AM, Stefan Hajnoczi wrote: Is there anything stopping this patch from being merged? Michael, any objections?  If not, I'll merge it.

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-19 Thread Michael S. Tsirkin
On Tue, Oct 19, 2010 at 02:44:35PM +0100, Stefan Hajnoczi wrote: On Tue, Oct 19, 2010 at 2:35 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Oct 19, 2010 at 08:12:42AM -0500, Anthony Liguori wrote: On 10/19/2010 08:07 AM, Stefan Hajnoczi wrote: Is there anything stopping this patch

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-05 Thread rukhsana ansari
Hi, W.r.t: Note that this is a tradeoff.  If an idle core is available and the scheduler places the iothread on that core, then the heavyweight exit is replaced by a lightweight exit + IPI.  If the iothread is co-located with the vcpu, then we'll take a heavyweight exit in any case. Q: Does

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-05 Thread Avi Kivity
On 10/05/2010 01:00 PM, rukhsana ansari wrote: Hi, W.r.t: Note that this is a tradeoff. If an idle core is available and the scheduler places the iothread on that core, then the heavyweight exit is replaced by a lightweight exit + IPI. If the iothread is co-located with the vcpu,

Re: [Qemu-devel] Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-04 Thread Avi Kivity
On 10/04/2010 03:18 AM, Anthony Liguori wrote: On 10/03/2010 09:28 AM, Michael S. Tsirkin wrote: This is using eventfd as well. Sorry, I meant irqfd. I've tried using irqfd in userspace. It hurts performance quite a bit compared to doing an ioctl so I would suspect this too. A

Re: [Qemu-devel] Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-04 Thread Anthony Liguori
On 10/04/2010 03:04 AM, Avi Kivity wrote: On 10/04/2010 03:18 AM, Anthony Liguori wrote: On 10/03/2010 09:28 AM, Michael S. Tsirkin wrote: This is using eventfd as well. Sorry, I meant irqfd. I've tried using irqfd in userspace. It hurts performance quite a bit compared to doing an

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-04 Thread Stefan Hajnoczi
On Sun, Oct 3, 2010 at 12:01 PM, Avi Kivity a...@redhat.com wrote:  On 09/30/2010 04:01 PM, 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

Re: [Qemu-devel] Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-04 Thread Michael S. Tsirkin
On Mon, Oct 04, 2010 at 09:01:14AM -0500, Anthony Liguori wrote: On 10/04/2010 03:04 AM, Avi Kivity wrote: On 10/04/2010 03:18 AM, Anthony Liguori wrote: On 10/03/2010 09:28 AM, Michael S. Tsirkin wrote: This is using eventfd as well. Sorry, I meant irqfd. I've tried using irqfd in

Re: [Qemu-devel] Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-04 Thread Anthony Liguori
On 10/04/2010 11:12 AM, Michael S. Tsirkin wrote: On Mon, Oct 04, 2010 at 09:01:14AM -0500, Anthony Liguori wrote: On 10/04/2010 03:04 AM, Avi Kivity wrote: On 10/04/2010 03:18 AM, Anthony Liguori wrote: On 10/03/2010 09:28 AM, Michael S. Tsirkin wrote:

Re: [Qemu-devel] Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-04 Thread Michael S. Tsirkin
On Mon, Oct 04, 2010 at 11:20:19AM -0500, Anthony Liguori wrote: On 10/04/2010 11:12 AM, Michael S. Tsirkin wrote: On Mon, Oct 04, 2010 at 09:01:14AM -0500, Anthony Liguori wrote: On 10/04/2010 03:04 AM, Avi Kivity wrote: On 10/04/2010 03:18 AM, Anthony Liguori wrote: On 10/03/2010 09:28 AM,

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-03 Thread Avi Kivity
On 09/30/2010 04:01 PM, 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 can be used to make

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-03 Thread Michael S. Tsirkin
On Sun, Oct 03, 2010 at 01:01:59PM +0200, Avi Kivity wrote: Guest to Host TCP_STREAM throughput(Mb/sec) --- Msg Size vhost-net virtio-net virtio-net/ioeventfd 65536 127556430 7590 16384 84993084

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-03 Thread Avi Kivity
On 10/03/2010 03:51 PM, Michael S. Tsirkin wrote: On Sun, Oct 03, 2010 at 01:01:59PM +0200, Avi Kivity wrote: Guest to Host TCP_STREAM throughput(Mb/sec) --- Msg Size vhost-net virtio-net virtio-net/ioeventfd 65536 127556430

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-03 Thread Michael S. Tsirkin
On Sun, Oct 03, 2010 at 04:21:57PM +0200, Avi Kivity wrote: On 10/03/2010 03:51 PM, Michael S. Tsirkin wrote: On Sun, Oct 03, 2010 at 01:01:59PM +0200, Avi Kivity wrote: Guest to Host TCP_STREAM throughput(Mb/sec) --- Msg Size vhost-net

Re: [PATCH] virtio: Use ioeventfd for virtqueue notify

2010-10-03 Thread Anthony Liguori
On 10/03/2010 09:28 AM, Michael S. Tsirkin wrote: This is using eventfd as well. Sorry, I meant irqfd. I've tried using irqfd in userspace. It hurts performance quite a bit compared to doing an ioctl so I would suspect this too. A last_used_idx or similar mechanism should help

[PATCH] virtio: Use ioeventfd for virtqueue notify

2010-09-30 Thread Stefan Hajnoczi
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 can be used to make virtqueue notify a lightweight exit by deferring