[libvirt] [PATCH 2/5] qemu: Store supported migration capabilities in a bitmap
Jiri Denemark
jdenemar at redhat.com
Fri Oct 20 07:03:03 UTC 2017
On Thu, Oct 19, 2017 at 18:30:53 -0400, John Ferlan wrote:
>
>
> On 10/18/2017 07:29 AM, Jiri Denemark wrote:
> > Each time we need to check whether a given migration capability is
> > supported by QEMU, we call query-migrate-capabilities QMP command and
> > lookup the capability in the returned list. Asking for the list of
> > supported capabilities once when we connect to QEMU and storing the
> > result in a bitmap is much better and we don't need to enter a monitor
> > just to check whether a migration capability is supported.
> >
> > Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> > ---
> > src/qemu/qemu_domain.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++
> > src/qemu/qemu_domain.h | 9 +++++++
> > src/qemu/qemu_process.c | 13 +---------
> > 3 files changed, 78 insertions(+), 12 deletions(-)
> >
>
> There's no corresponding adjustment to qemuDomainObjPrivateXMLFormat and
> qemuDomainObjPrivateXMLParse in order to handle the restart scenario.
>
> The rest of this looks OK, but do you need the Format/Parse logic for
> the bitmap?
No. The migration capabilities are rechecked every time libvirt connects
to QEMU as said in the commit message and in qemu_domain.h:
> > diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
> > index 5201c6a0ac..fb20d8ea63 100644
> > --- a/src/qemu/qemu_domain.h
> > +++ b/src/qemu/qemu_domain.h
> > @@ -323,6 +323,10 @@ struct _qemuDomainObjPrivate {
> >
> > /* Tracks blockjob state for vm. Valid only while reconnecting to qemu. */
> > virTristateBool reconnectBlockjobs;
> > +
> > + /* Migration capabilities. Rechecked on reconnect, not to be saved in
> > + * private XML. */
> > + virBitmapPtr migrationCaps;
> > };
Jirka
More information about the libvir-list
mailing list