Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Daniel P. Berrange
On Thu, Apr 23, 2015 at 02:02:25PM +0200, Michal Privoznik wrote: > On 23.04.2015 13:32, zhang bo wrote: > > On 2015/4/23 19:06, Daniel P. Berrange wrote: > > > >> On Thu, Apr 23, 2015 at 07:00:21PM +0800, zhang bo wrote: > >>> The reason for the problem is that: > >>> 1 guestA locks vm while crea

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Peter Krempa
On Thu, Apr 23, 2015 at 14:02:25 +0200, Michal Privoznik wrote: > On 23.04.2015 13:32, zhang bo wrote: > > On 2015/4/23 19:06, Daniel P. Berrange wrote: > > > >> On Thu, Apr 23, 2015 at 07:00:21PM +0800, zhang bo wrote: > >>> The reason for the problem is that: > >>> 1 guestA locks vm while creati

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Michal Privoznik
On 23.04.2015 13:32, zhang bo wrote: > On 2015/4/23 19:06, Daniel P. Berrange wrote: > >> On Thu, Apr 23, 2015 at 07:00:21PM +0800, zhang bo wrote: >>> The reason for the problem is that: >>> 1 guestA locks vm while creating each tapDev(virNetDevTapCreate) in >>> qemuBuildCommandLine(), for 10sec

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread zhang bo
On 2015/4/23 19:06, Daniel P. Berrange wrote: > On Thu, Apr 23, 2015 at 07:00:21PM +0800, zhang bo wrote: >> The reason for the problem is that: >> 1 guestA locks vm while creating each tapDev(virNetDevTapCreate) in >> qemuBuildCommandLine(), for 10seconds >> 2 guestB calls qemuMigrationPrepareAn

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Daniel P. Berrange
On Thu, Apr 23, 2015 at 07:00:21PM +0800, zhang bo wrote: > The reason for the problem is that: > 1 guestA locks vm while creating each tapDev(virNetDevTapCreate) in > qemuBuildCommandLine(), for 10seconds > 2 guestB calls qemuMigrationPrepareAny->*virDomainObjListAdd* to get its vm > object, whi

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread zhang bo
On 2015/4/23 17:46, Michal Privoznik wrote: > On 23.04.2015 11:32, Peter Krempa wrote: >> On Thu, Apr 23, 2015 at 11:19:34 +0200, Michal Privoznik wrote: >>> On 23.04.2015 10:30, Peter Krempa wrote: On Thu, Apr 23, 2015 at 11:44:49 +0800, zhang bo wrote: > The function qemuBuildCommandLin

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Michal Privoznik
On 23.04.2015 11:32, Peter Krempa wrote: > On Thu, Apr 23, 2015 at 11:19:34 +0200, Michal Privoznik wrote: >> On 23.04.2015 10:30, Peter Krempa wrote: >>> On Thu, Apr 23, 2015 at 11:44:49 +0800, zhang bo wrote: The function qemuBuildCommandLine() may take a long time, for example if we co

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Peter Krempa
On Thu, Apr 23, 2015 at 11:19:34 +0200, Michal Privoznik wrote: > On 23.04.2015 10:30, Peter Krempa wrote: > > On Thu, Apr 23, 2015 at 11:44:49 +0800, zhang bo wrote: > >> The function qemuBuildCommandLine() may take a long time, for example > >> if we configure tens of vifs for the guest, each may

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Daniel P. Berrange
On Thu, Apr 23, 2015 at 11:19:34AM +0200, Michal Privoznik wrote: > On 23.04.2015 10:30, Peter Krempa wrote: > > On Thu, Apr 23, 2015 at 11:44:49 +0800, zhang bo wrote: > >> The function qemuBuildCommandLine() may take a long time, for example > >> if we configure tens of vifs for the guest, each m

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Michal Privoznik
On 23.04.2015 10:30, Peter Krempa wrote: > On Thu, Apr 23, 2015 at 11:44:49 +0800, zhang bo wrote: >> The function qemuBuildCommandLine() may take a long time, for example >> if we configure tens of vifs for the guest, each may cost hundrands of >> milliseconds to create tap dev, senconds in total.

Re: [libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-23 Thread Peter Krempa
On Thu, Apr 23, 2015 at 11:44:49 +0800, zhang bo wrote: > The function qemuBuildCommandLine() may take a long time, for example > if we configure tens of vifs for the guest, each may cost hundrands of > milliseconds to create tap dev, senconds in total. Thus, unlock vm > before calling it. > > Sig

[libvirt] [PATCH] qemu: lock: unlock vm during qemuBuildCommandLine

2015-04-22 Thread zhang bo
The function qemuBuildCommandLine() may take a long time, for example if we configure tens of vifs for the guest, each may cost hundrands of milliseconds to create tap dev, senconds in total. Thus, unlock vm before calling it. Signed-off-by: Zhang Bo Signed-off-by: Zhou Yimin --- src/qemu/qemu_