Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-06-19 Thread Paolo Bonzini
Il 19/06/2014 17:19, Chris Friesen ha scritto: On 05/09/2014 02:19 AM, Paolo Bonzini wrote: Il 09/05/2014 02:53, Chris Friesen ha scritto: Turns out I spoke too soon. With the patch applied, it boots, but if I try to do a live migration both the source and destination crash. This happens fo

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-06-19 Thread Chris Friesen
On 05/09/2014 02:19 AM, Paolo Bonzini wrote: Il 09/05/2014 02:53, Chris Friesen ha scritto: Turns out I spoke too soon. With the patch applied, it boots, but if I try to do a live migration both the source and destination crash. This happens for both the master branch as well as the stable-1

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-09 Thread Paolo Bonzini
Il 09/05/2014 02:53, Chris Friesen ha scritto: Turns out I spoke too soon. With the patch applied, it boots, but if I try to do a live migration both the source and destination crash. This happens for both the master branch as well as the stable-1.4 branch. The destination doesn't crash, it

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Chris Friesen
On 05/08/2014 07:44 PM, ChenLiang wrote: > Hi, > I have test the patch at the qemu.git, qemu crashed when vm is booting. > > the backtrace is: > > Program received signal SIGABRT, Aborted. > [Switching to Thread 0x7f6bf67f9700 (LWP 9740)] > 0x7f6bfacb2b55 in raise () from /lib64/libc.so.6 >

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread ChenLiang
On 2014/5/8 22:34, Paolo Bonzini wrote: > Il 08/05/2014 16:31, Chris Friesen ha scritto: >> >> >> The fact remains that qemu crashes when I apply the patch. I also tried >> patching it as below in virtio_pci_vmstate_change(). That would allow >> the VM to boot, but it would crash when I tried to

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Chris Friesen
On 05/08/2014 09:40 AM, Chris Friesen wrote: On 05/08/2014 07:47 AM, Amit Shah wrote: Chris, I just tried a simple test this way: ./x86_64-softmmu/qemu-system-x86_64 -device virtio-serial-pci -device virtserialport -S -monitor stdio -nographic and it didn't crash for me. This was with qemu.g

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Chris Friesen
On 05/08/2014 10:02 AM, Paolo Bonzini wrote: Il 08/05/2014 17:57, Chris Friesen ha scritto: The fact remains that qemu crashes when I apply the patch. I also tried patching it as below in virtio_pci_vmstate_change(). That would allow the VM to boot, but it would crash when I tried to do a liv

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Paolo Bonzini
Il 08/05/2014 17:57, Chris Friesen ha scritto: The fact remains that qemu crashes when I apply the patch. I also tried patching it as below in virtio_pci_vmstate_change(). That would allow the VM to boot, but it would crash when I tried to do a live migration. Can you give us your command li

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Chris Friesen
On 05/08/2014 08:34 AM, Paolo Bonzini wrote: Il 08/05/2014 16:31, Chris Friesen ha scritto: The fact remains that qemu crashes when I apply the patch. I also tried patching it as below in virtio_pci_vmstate_change(). That would allow the VM to boot, but it would crash when I tried to do a li

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Chris Friesen
On 05/08/2014 07:47 AM, Amit Shah wrote: Chris, I just tried a simple test this way: ./x86_64-softmmu/qemu-system-x86_64 -device virtio-serial-pci -device virtserialport -S -monitor stdio -nographic and it didn't crash for me. This was with qemu.git. Perhaps you can try in a similar way.

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Paolo Bonzini
Il 08/05/2014 16:31, Chris Friesen ha scritto: The fact remains that qemu crashes when I apply the patch. I also tried patching it as below in virtio_pci_vmstate_change(). That would allow the VM to boot, but it would crash when I tried to do a live migration. Can you give us your command l

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Chris Friesen
On 05/08/2014 07:30 AM, Amit Shah wrote: On (Thu) 08 May 2014 [15:14:26], Paolo Bonzini wrote: Il 08/05/2014 15:02, Amit Shah ha scritto: I tried the patch below. Unfortunately it seems to cause qemu to crash. This doesn't remove the memory_region_transaction_begin() and _commit() from memory

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Amit Shah
On (Thu) 08 May 2014 [15:36:13], Paolo Bonzini wrote: > Il 08/05/2014 15:30, Amit Shah ha scritto: > >On (Thu) 08 May 2014 [15:14:26], Paolo Bonzini wrote: > >>Il 08/05/2014 15:02, Amit Shah ha scritto: > >I tried the patch below. Unfortunately it seems to cause qemu to crash. > >>>This doesn'

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Paolo Bonzini
Il 08/05/2014 15:30, Amit Shah ha scritto: On (Thu) 08 May 2014 [15:14:26], Paolo Bonzini wrote: Il 08/05/2014 15:02, Amit Shah ha scritto: I tried the patch below. Unfortunately it seems to cause qemu to crash. This doesn't remove the memory_region_transaction_begin() and _commit() from memo

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Amit Shah
On (Thu) 08 May 2014 [15:14:26], Paolo Bonzini wrote: > Il 08/05/2014 15:02, Amit Shah ha scritto: > >>> I tried the patch below. Unfortunately it seems to cause qemu to crash. > >This doesn't remove the memory_region_transaction_begin() and > >_commit() from memory_region_add_eventfd(), which wil

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Paolo Bonzini
Il 08/05/2014 15:02, Amit Shah ha scritto: > I tried the patch below. Unfortunately it seems to cause qemu to crash. This doesn't remove the memory_region_transaction_begin() and _commit() from memory_region_add_eventfd(), which will still be called. That's correct, transactions can be nested

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread Amit Shah
On (Wed) 07 May 2014 [16:25:50], Chris Friesen wrote: > On 05/07/2014 12:39 AM, Paolo Bonzini wrote: > >Il 06/05/2014 22:01, Chris Friesen ha scritto: > >> > >>It seems like the main problem is that we loop over all the queues, > >>calling virtio_pci_set_host_notifier_internal() on each of them. T

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-07 Thread Gonglei (Arei)
Hi, > Subject: Re: [Qemu-devel] virtio-serial-pci very expensive during live > migration > > Il 06/05/2014 22:01, Chris Friesen ha scritto: > > > > It seems like the main problem is that we loop over all the queues, > > calling virtio_pci_set_host_notifier_int

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-07 Thread Chris Friesen
On 05/07/2014 12:39 AM, Paolo Bonzini wrote: Il 06/05/2014 22:01, Chris Friesen ha scritto: It seems like the main problem is that we loop over all the queues, calling virtio_pci_set_host_notifier_internal() on each of them. That in turn calls memory_region_add_eventfd(), which calls memory_re

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-06 Thread Paolo Bonzini
Il 06/05/2014 22:01, Chris Friesen ha scritto: It seems like the main problem is that we loop over all the queues, calling virtio_pci_set_host_notifier_internal() on each of them. That in turn calls memory_region_add_eventfd(), which calls memory_region_transaction_commit(), which scans over al

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-06 Thread Markus Armbruster
Copying Amit. Chris Friesen writes: > Hi, > > I recently made the unfortunate discovery that virtio-serial-pci is > quite expensive to stop/start during live migration. > > By default we support 32 ports, each of which uses 2 queues. In my > case it takes 2-3ms per queue to disconnect on the so

[Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-06 Thread Chris Friesen
Hi, I recently made the unfortunate discovery that virtio-serial-pci is quite expensive to stop/start during live migration. By default we support 32 ports, each of which uses 2 queues. In my case it takes 2-3ms per queue to disconnect on the source host, and another 2-3ms per queue to conn