From: Peter Xu <peterx@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] migration: export cap/params to qdev props
Date: Fri, 14 Jul 2017 12:23:06 +0800 [thread overview]
Message-ID: <20170714042306.GH27284@pxdev.xzpeter.org> (raw)
In-Reply-To: <20170712190240.GM30658@work-vm>
On Wed, Jul 12, 2017 at 08:02:40PM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (peterx@redhat.com) wrote:
> > We have the MigrationState as QDev now (which seems crazy). Let's
> > continue to benefit.
> >
> > This series is exporting all migration capabilities/params as global
> > parameters. Then we can do something like this:
> >
> > qemu -global migration.postcopy-ram=true \
> > -global migration.max-bandwidth=4096
> >
> > The values will be inited just like we typed these values into HMP
> > monitor. It'll simplify lots of migration scripts.
> >
> > The changes are fairly straightforward. One tiny loss is that we still
> > don't support:
> >
> > -global migration.max-bandwidth=1g
> >
> > ...just like what we did in HMP:
> >
> > migrate_set_speed 1g
> >
> > ...while we need to use:
> >
> > -global migration.max-bandwidth=1073741824
> >
> > However that should only be used in scripts, and that's good enough
> > imho.
> >
> > These properties should only be used for debugging/testing purpose,
> > and we should not guarantee any interface compatibility for them (just
> > like HMP).
>
> I guess the sanity checks in qmp_migrate_set_parameters and
> qmp_migrate_set_capabilities aren't run?
Indeed I missed this point. Before that: Eduardo, do you think below
change would make any sense?
diff --git a/qom/object.c b/qom/object.c
index 5f6fdfa..ca077a9 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -347,13 +347,13 @@ static void object_init_with_type(Object *obj, TypeImpl *ti)
static void object_post_init_with_type(Object *obj, TypeImpl *ti)
{
- if (ti->instance_post_init) {
- ti->instance_post_init(obj);
- }
-
if (type_has_parent(ti)) {
object_post_init_with_type(obj, type_get_parent(ti));
}
+
+ if (ti->instance_post_init) {
+ ti->instance_post_init(obj);
+ }
}
static void object_initialize_with_type(void *data, size_t size, TypeImpl *type)
IMHO it'll make more sense if we call the parent post_init first (just
like most of the other object hooks). Or is current ordering intended?
If we can have above change, it'll be much easier for me to do the
check that Dave mentioned, after the global properties applied (I can
then just provide post_init hook for the migration object).
>
> Also, have you done any checks on multiple migrations; e.g. it's good
> to check that the flags/state are all preserved if we do a migrate, that
> migrate fails or is cancelled and then you do a 2nd migrate.
I think so. They'll be applied only when creating the object, and
they'll be there even after a e.g. migrate_cancel. Thanks,
--
Peter Xu
next prev parent reply other threads:[~2017-07-14 4:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 6:53 [Qemu-devel] [PATCH 0/3] migration: export cap/params to qdev props Peter Xu
2017-07-12 6:53 ` [Qemu-devel] [PATCH 1/3] qdev: provide DEFINE_PROP_INT64() Peter Xu
2017-07-13 16:05 ` Marc-André Lureau
2017-07-14 3:06 ` Peter Xu
2017-07-12 6:53 ` [Qemu-devel] [PATCH 2/3] migration: export parameters to props Peter Xu
2017-07-12 18:49 ` Dr. David Alan Gilbert
2017-07-12 6:53 ` [Qemu-devel] [PATCH 3/3] migration: export capabilities " Peter Xu
2017-07-12 18:59 ` Dr. David Alan Gilbert
2017-07-12 19:02 ` [Qemu-devel] [PATCH 0/3] migration: export cap/params to qdev props Dr. David Alan Gilbert
2017-07-14 4:23 ` Peter Xu [this message]
2017-07-14 15:57 ` Eduardo Habkost
2017-07-17 3:25 ` Peter Xu
2017-07-12 19:05 ` Eduardo Habkost
2017-07-14 5:04 ` Peter Xu
2017-07-14 16:01 ` Eduardo Habkost
2017-07-14 16:32 ` Dr. David Alan Gilbert
2017-07-17 3:06 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170714042306.GH27284@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.