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

2011-01-25 Thread Anthony Liguori
On 01/25/2011 01:59 PM, Stefan Hajnoczi wrote: int kvm_cpu_exec(CPUState *env) { struct kvm_run *run = env->kvm_run; int ret; DPRINTF("kvm_cpu_exec()\n"); do { This is broken because a signal handler could change env->exit_request after this check: #ifndef CONFIG_IOTHREAD

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

2011-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2011 at 7:51 PM, Anthony Liguori wrote: > On 01/25/2011 01:45 PM, Stefan Hajnoczi wrote: >> >> On Tue, Jan 25, 2011 at 7:18 PM, Anthony Liguori >>  wrote: >> >>> >>> On 01/25/2011 03:49 AM, Stefan Hajnoczi wrote: >>> On Tue, Jan 25, 2011 at 7:12 AM, Stefan Hajnoczi

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

2011-01-25 Thread Anthony Liguori
On 01/25/2011 01:45 PM, Stefan Hajnoczi wrote: On Tue, Jan 25, 2011 at 7:18 PM, Anthony Liguori wrote: On 01/25/2011 03:49 AM, Stefan Hajnoczi wrote: On Tue, Jan 25, 2011 at 7:12 AM, Stefan Hajnoczi wrote: On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolfwrote:

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

2011-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2011 at 7:18 PM, Anthony Liguori wrote: > On 01/25/2011 03:49 AM, Stefan Hajnoczi wrote: >> >> On Tue, Jan 25, 2011 at 7:12 AM, Stefan Hajnoczi >>  wrote: >> >>> >>> On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolf  wrote: >>> Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: >

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

2011-01-25 Thread Anthony Liguori
On 01/25/2011 03:49 AM, Stefan Hajnoczi wrote: On Tue, Jan 25, 2011 at 7:12 AM, Stefan Hajnoczi wrote: On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolf wrote: Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote:

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

2011-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2011 at 1:20 PM, Stefan Hajnoczi wrote: > eventfd does not seem to support O_ASYNC. linux-2.6/fs/eventfd.c does not implement file_operations::fasync() so I'm convinced SIGIO is not possible here. I have sent a patch to disable virtio-ioeventfd when !CONFIG_IOTHREAD. Stefan

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

2011-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2011 at 11:27 AM, Michael S. Tsirkin wrote: > On Tue, Jan 25, 2011 at 09:49:04AM +, Stefan Hajnoczi wrote: >> On Tue, Jan 25, 2011 at 7:12 AM, Stefan Hajnoczi wrote: >> > On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolf wrote: >> >> Am 24.01.2011 20:47, schrieb Michael S. Tsirkin:

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

2011-01-25 Thread Michael S. Tsirkin
On Tue, Jan 25, 2011 at 09:49:04AM +, Stefan Hajnoczi wrote: > On Tue, Jan 25, 2011 at 7:12 AM, Stefan Hajnoczi wrote: > > On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolf wrote: > >> Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: > >>> On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote:

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

2011-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2011 at 9:49 AM, Stefan Hajnoczi wrote: > If any other vcpu interruption makes virtio-ioeventfd chug along then > why are you seeing 100% CPU livelock?  My theory is that dynticks has > a race condition which causes timers to stop working in QEMU. I forgot to mention that you can

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

2011-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2011 at 7:12 AM, Stefan Hajnoczi wrote: > On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolf wrote: >> Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: >>> On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote: Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: > On Mon, Jan

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

2011-01-24 Thread Stefan Hajnoczi
On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolf wrote: > Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: >> On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote: >>> Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: > Am 12.12.

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

2011-01-24 Thread Kevin Wolf
Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: > On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote: >> Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: >>> On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: > Virtqueue notif

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

2011-01-24 Thread Michael S. Tsirkin
On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote: > Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: > > On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: > >> Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: > >>> Virtqueue notify is currently handled synchronously in userspace vi

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

2011-01-24 Thread Kevin Wolf
Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: > On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: >> Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: >>> Virtqueue notify is currently handled synchronously in userspace virtio. >>> This >>> prevents the vcpu from executing guest code whi

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

2011-01-24 Thread Michael S. Tsirkin
On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: > Am 12.12.2010 16:02, schrieb 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. >

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

2011-01-24 Thread Kevin Wolf
Am 12.12.2010 16:02, schrieb 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 m