qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Xu <peterx@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 2/3] migration: export parameters to props
Date: Wed, 12 Jul 2017 19:49:22 +0100	[thread overview]
Message-ID: <20170712184921.GK30658@work-vm> (raw)
In-Reply-To: <1499842423-21101-3-git-send-email-peterx@redhat.com>

* Peter Xu (peterx@redhat.com) wrote:
> Export migration parameters to qdev properties. Then we can use, for
> example:
> 
>   -global migration.cpu-throttle-initial=xxx
> 
> To specify migration parameters during init.
> 
> One thing to mention is that, this usage should only be used for
> debugging/testing purpose, and should never be used elsewhere.
> Meanwhile, we don't guarantee the compatibility of this interface. It
> can alter anytime in the future.
> 
> (Ok, it won't change a lot. But it'll just work like HMP - Let's just be
>  prepare for any possible change to it)
> 
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  migration/migration.c | 35 +++++++++++++++++++++++++----------
>  1 file changed, 25 insertions(+), 10 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index a0db40d..fd00670 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -2009,6 +2009,31 @@ static Property migration_properties[] = {
>                       send_configuration, true),
>      DEFINE_PROP_BOOL("send-section-footer", MigrationState,
>                       send_section_footer, true),
> +
> +    /* Migration parameters */
> +    DEFINE_PROP_INT64("compress-level", MigrationState,
> +                      parameters.compress_level,
> +                      DEFAULT_MIGRATE_COMPRESS_LEVEL),
> +    DEFINE_PROP_INT64("compress-threads", MigrationState,
> +                      parameters.compress_threads,
> +                      DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT),
> +    DEFINE_PROP_INT64("decompress-threads", MigrationState,
> +                      parameters.decompress_threads,
> +                      DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT),
> +    DEFINE_PROP_INT64("cpu-throttle-initial", MigrationState,
> +                      parameters.cpu_throttle_initial,
> +                      DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL),
> +    DEFINE_PROP_INT64("cpu-throttle-increment", MigrationState,
> +                      parameters.cpu_throttle_increment,
> +                      DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT),
> +    DEFINE_PROP_INT64("max-bandwidth", MigrationState,
> +                      parameters.max_bandwidth, MAX_THROTTLE),
> +    DEFINE_PROP_INT64("downtime-limit", MigrationState,
> +                      parameters.downtime_limit,
> +                      DEFAULT_MIGRATE_SET_DOWNTIME),
> +    DEFINE_PROP_INT64("x-checkpoint-delay", MigrationState,
> +                      parameters.x_checkpoint_delay,
> +                      DEFAULT_MIGRATE_X_CHECKPOINT_DELAY),
>      DEFINE_PROP_END_OF_LIST(),
>  };
>  
> @@ -2027,16 +2052,6 @@ static void migration_instance_init(Object *obj)
>      ms->state = MIGRATION_STATUS_NONE;
>      ms->xbzrle_cache_size = DEFAULT_MIGRATE_CACHE_SIZE;
>      ms->mbps = -1;
> -    ms->parameters = (MigrationParameters) {
> -        .compress_level = DEFAULT_MIGRATE_COMPRESS_LEVEL,
> -        .compress_threads = DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT,
> -        .decompress_threads = DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT,
> -        .cpu_throttle_initial = DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL,
> -        .cpu_throttle_increment = DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT,
> -        .max_bandwidth = MAX_THROTTLE,
> -        .downtime_limit = DEFAULT_MIGRATE_SET_DOWNTIME,
> -        .x_checkpoint_delay = DEFAULT_MIGRATE_X_CHECKPOINT_DELAY,
> -    };
>      ms->parameters.tls_creds = g_strdup("");
>      ms->parameters.tls_hostname = g_strdup("");
>  }
> -- 
> 2.7.4
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2017-07-12 18:49 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 [this message]
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
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=20170712184921.GK30658@work-vm \
    --to=dgilbert@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peterx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).