mirror of
https://github.com/qemu/qemu.git
synced 2024-12-05 01:33:41 +08:00
migration: export parameters to props
Export migration parameters to qdev properties. Then we can use, for example: -global migration.x-cpu-throttle-initial=xxx To specify migration parameters during init. Prefix "x-" is appended for each parameter exported to show that this is not a stable interface, and only for debugging/testing purpose. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-3-git-send-email-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
07d1d063d3
commit
89632fafdc
@ -2010,6 +2010,31 @@ static Property migration_properties[] = {
|
||||
send_configuration, true),
|
||||
DEFINE_PROP_BOOL("send-section-footer", MigrationState,
|
||||
send_section_footer, true),
|
||||
|
||||
/* Migration parameters */
|
||||
DEFINE_PROP_INT64("x-compress-level", MigrationState,
|
||||
parameters.compress_level,
|
||||
DEFAULT_MIGRATE_COMPRESS_LEVEL),
|
||||
DEFINE_PROP_INT64("x-compress-threads", MigrationState,
|
||||
parameters.compress_threads,
|
||||
DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT),
|
||||
DEFINE_PROP_INT64("x-decompress-threads", MigrationState,
|
||||
parameters.decompress_threads,
|
||||
DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT),
|
||||
DEFINE_PROP_INT64("x-cpu-throttle-initial", MigrationState,
|
||||
parameters.cpu_throttle_initial,
|
||||
DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL),
|
||||
DEFINE_PROP_INT64("x-cpu-throttle-increment", MigrationState,
|
||||
parameters.cpu_throttle_increment,
|
||||
DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT),
|
||||
DEFINE_PROP_INT64("x-max-bandwidth", MigrationState,
|
||||
parameters.max_bandwidth, MAX_THROTTLE),
|
||||
DEFINE_PROP_INT64("x-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(),
|
||||
};
|
||||
|
||||
@ -2028,16 +2053,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("");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user