The new autoconverge throttling commands have been tested for a release now. It is time to move them out of the experimental state.
Signed-off-by: Jason J. Herne <jjhe...@linux.vnet.ibm.com> --- hmp.c | 28 +++++++++++++------------- migration/migration.c | 56 +++++++++++++++++++++++++-------------------------- migration/ram.c | 4 ++-- qapi-schema.json | 54 ++++++++++++++++++++++++------------------------- qmp-commands.hx | 22 ++++++++++---------- 5 files changed, 82 insertions(+), 82 deletions(-) diff --git a/hmp.c b/hmp.c index d510236..9f9bcf9 100644 --- a/hmp.c +++ b/hmp.c @@ -235,9 +235,9 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict) info->xbzrle_cache->overflow); } - if (info->has_x_cpu_throttle_percentage) { + if (info->has_cpu_throttle_percentage) { monitor_printf(mon, "cpu throttle percentage: %" PRIu64 "\n", - info->x_cpu_throttle_percentage); + info->cpu_throttle_percentage); } qapi_free_MigrationInfo(info); @@ -281,11 +281,11 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict) MigrationParameter_lookup[MIGRATION_PARAMETER_DECOMPRESS_THREADS], params->decompress_threads); monitor_printf(mon, " %s: %" PRId64, - MigrationParameter_lookup[MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL], - params->x_cpu_throttle_initial); + MigrationParameter_lookup[MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL], + params->cpu_throttle_initial); monitor_printf(mon, " %s: %" PRId64, - MigrationParameter_lookup[MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT], - params->x_cpu_throttle_increment); + MigrationParameter_lookup[MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT], + params->cpu_throttle_increment); monitor_printf(mon, "\n"); } @@ -1240,8 +1240,8 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) bool has_compress_level = false; bool has_compress_threads = false; bool has_decompress_threads = false; - bool has_x_cpu_throttle_initial = false; - bool has_x_cpu_throttle_increment = false; + bool has_cpu_throttle_initial = false; + bool has_cpu_throttle_increment = false; int i; for (i = 0; i < MIGRATION_PARAMETER__MAX; i++) { @@ -1256,18 +1256,18 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) case MIGRATION_PARAMETER_DECOMPRESS_THREADS: has_decompress_threads = true; break; - case MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL: - has_x_cpu_throttle_initial = true; + case MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL: + has_cpu_throttle_initial = true; break; - case MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT: - has_x_cpu_throttle_increment = true; + case MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT: + has_cpu_throttle_increment = true; break; } qmp_migrate_set_parameters(has_compress_level, value, has_compress_threads, value, has_decompress_threads, value, - has_x_cpu_throttle_initial, value, - has_x_cpu_throttle_increment, value, + has_cpu_throttle_initial, value, + has_cpu_throttle_increment, value, &err); break; } diff --git a/migration/migration.c b/migration/migration.c index 991313a..6398caa 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -50,8 +50,8 @@ /*0: means nocompress, 1: best speed, ... 9: best compress ratio */ #define DEFAULT_MIGRATE_COMPRESS_LEVEL 1 /* Define default autoconverge cpu throttle migration parameters */ -#define DEFAULT_MIGRATE_X_CPU_THROTTLE_INITIAL 20 -#define DEFAULT_MIGRATE_X_CPU_THROTTLE_INCREMENT 10 +#define DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL 20 +#define DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT 10 /* Migration XBZRLE default cache size */ #define DEFAULT_MIGRATE_CACHE_SIZE (64 * 1024 * 1024) @@ -87,10 +87,10 @@ MigrationState *migrate_get_current(void) DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT, .parameters[MIGRATION_PARAMETER_DECOMPRESS_THREADS] = DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT, - .parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL] = - DEFAULT_MIGRATE_X_CPU_THROTTLE_INITIAL, - .parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT] = - DEFAULT_MIGRATE_X_CPU_THROTTLE_INCREMENT, + .parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL] = + DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL, + .parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT] = + DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT, }; if (!once) { @@ -521,10 +521,10 @@ MigrationParameters *qmp_query_migrate_parameters(Error **errp) s->parameters[MIGRATION_PARAMETER_COMPRESS_THREADS]; params->decompress_threads = s->parameters[MIGRATION_PARAMETER_DECOMPRESS_THREADS]; - params->x_cpu_throttle_initial = - s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL]; - params->x_cpu_throttle_increment = - s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT]; + params->cpu_throttle_initial = + s->parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL]; + params->cpu_throttle_increment = + s->parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT]; return params; } @@ -607,8 +607,8 @@ MigrationInfo *qmp_query_migrate(Error **errp) } if (cpu_throttle_active()) { - info->has_x_cpu_throttle_percentage = true; - info->x_cpu_throttle_percentage = cpu_throttle_get_percentage(); + info->has_cpu_throttle_percentage = true; + info->cpu_throttle_percentage = cpu_throttle_get_percentage(); } get_xbzrle_cache_stats(info); @@ -718,10 +718,10 @@ void qmp_migrate_set_parameters(bool has_compress_level, int64_t compress_threads, bool has_decompress_threads, int64_t decompress_threads, - bool has_x_cpu_throttle_initial, - int64_t x_cpu_throttle_initial, - bool has_x_cpu_throttle_increment, - int64_t x_cpu_throttle_increment, Error **errp) + bool has_cpu_throttle_initial, + int64_t cpu_throttle_initial, + bool has_cpu_throttle_increment, + int64_t cpu_throttle_increment, Error **errp) { MigrationState *s = migrate_get_current(); @@ -744,16 +744,16 @@ void qmp_migrate_set_parameters(bool has_compress_level, "is invalid, it should be in the range of 1 to 255"); return; } - if (has_x_cpu_throttle_initial && - (x_cpu_throttle_initial < 1 || x_cpu_throttle_initial > 99)) { + if (has_cpu_throttle_initial && + (cpu_throttle_initial < 1 || cpu_throttle_initial > 99)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "x_cpu_throttle_initial", + "cpu_throttle_initial", "an integer in the range of 1 to 99"); } - if (has_x_cpu_throttle_increment && - (x_cpu_throttle_increment < 1 || x_cpu_throttle_increment > 99)) { + if (has_cpu_throttle_increment && + (cpu_throttle_increment < 1 || cpu_throttle_increment > 99)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "x_cpu_throttle_increment", + "cpu_throttle_increment", "an integer in the range of 1 to 99"); } @@ -767,14 +767,14 @@ void qmp_migrate_set_parameters(bool has_compress_level, s->parameters[MIGRATION_PARAMETER_DECOMPRESS_THREADS] = decompress_threads; } - if (has_x_cpu_throttle_initial) { - s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL] = - x_cpu_throttle_initial; + if (has_cpu_throttle_initial) { + s->parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL] = + cpu_throttle_initial; } - if (has_x_cpu_throttle_increment) { - s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT] = - x_cpu_throttle_increment; + if (has_cpu_throttle_increment) { + s->parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT] = + cpu_throttle_increment; } } diff --git a/migration/ram.c b/migration/ram.c index 3f05738..1da5a53 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -428,9 +428,9 @@ static void mig_throttle_guest_down(void) { MigrationState *s = migrate_get_current(); uint64_t pct_initial = - s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL]; + s->parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL]; uint64_t pct_icrement = - s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT]; + s->parameters[MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT]; /* We have not started throttling yet. Let's start it. */ if (!cpu_throttle_active()) { diff --git a/qapi-schema.json b/qapi-schema.json index 54634c4..9a322d1 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -480,9 +480,9 @@ # may be expensive, but do not actually occur during the iterative # migration rounds themselves. (since 1.6) # -# @x-cpu-throttle-percentage: #optional percentage of time guest cpus are being -# throttled during auto-converge. This is only present when auto-converge -# has started throttling guest cpus. (Since 2.5) +# @cpu-throttle-percentage: #optional percentage of time guest cpus are being +# throttled during auto-converge. This is only present when auto-converge +# has started throttling guest cpus. (Since 2.7) # # Since: 0.14.0 ## @@ -494,7 +494,7 @@ '*expected-downtime': 'int', '*downtime': 'int', '*setup-time': 'int', - '*x-cpu-throttle-percentage': 'int'} } + '*cpu-throttle-percentage': 'int'} } ## # @query-migrate @@ -605,18 +605,18 @@ # compression, so set the decompress-threads to the number about 1/4 # of compress-threads is adequate. # -# @x-cpu-throttle-initial: Initial percentage of time guest cpus are throttled -# when migration auto-converge is activated. The -# default value is 20. (Since 2.5) +# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled +# when migration auto-converge is activated. The +# default value is 20. (Since 2.7) # -# @x-cpu-throttle-increment: throttle percentage increase each time -# auto-converge detects that migration is not making -# progress. The default value is 10. (Since 2.5) +# @cpu-throttle-increment: throttle percentage increase each time +# auto-converge detects that migration is not making +# progress. The default value is 10. (Since 2.7) # Since: 2.4 ## { 'enum': 'MigrationParameter', 'data': ['compress-level', 'compress-threads', 'decompress-threads', - 'x-cpu-throttle-initial', 'x-cpu-throttle-increment'] } + 'cpu-throttle-initial', 'cpu-throttle-increment'] } # # @migrate-set-parameters @@ -629,21 +629,21 @@ # # @decompress-threads: decompression thread count # -# @x-cpu-throttle-initial: Initial percentage of time guest cpus are throttled -# when migration auto-converge is activated. The -# default value is 20. (Since 2.5) +# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled +# when migration auto-converge is activated. The +# default value is 20. (Since 2.7) # -# @x-cpu-throttle-increment: throttle percentage increase each time -# auto-converge detects that migration is not making -# progress. The default value is 10. (Since 2.5) +# @cpu-throttle-increment: throttle percentage increase each time +# auto-converge detects that migration is not making +# progress. The default value is 10. (Since 2.7) # Since: 2.4 ## { 'command': 'migrate-set-parameters', 'data': { '*compress-level': 'int', '*compress-threads': 'int', '*decompress-threads': 'int', - '*x-cpu-throttle-initial': 'int', - '*x-cpu-throttle-increment': 'int'} } + '*cpu-throttle-initial': 'int', + '*cpu-throttle-increment': 'int'} } # # @MigrationParameters @@ -654,13 +654,13 @@ # # @decompress-threads: decompression thread count # -# @x-cpu-throttle-initial: Initial percentage of time guest cpus are throttled -# when migration auto-converge is activated. The -# default value is 20. (Since 2.5) +# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled +# when migration auto-converge is activated. The +# default value is 20. (Since 2.7) # -# @x-cpu-throttle-increment: throttle percentage increase each time -# auto-converge detects that migration is not making -# progress. The default value is 10. (Since 2.5) +# @cpu-throttle-increment: throttle percentage increase each time +# auto-converge detects that migration is not making +# progress. The default value is 10. (Since 2.7) # # Since: 2.4 ## @@ -668,8 +668,8 @@ 'data': { 'compress-level': 'int', 'compress-threads': 'int', 'decompress-threads': 'int', - 'x-cpu-throttle-initial': 'int', - 'x-cpu-throttle-increment': 'int'} } + 'cpu-throttle-initial': 'int', + 'cpu-throttle-increment': 'int'} } ## # @query-migrate-parameters # diff --git a/qmp-commands.hx b/qmp-commands.hx index de896a5..8a12fc3 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3747,10 +3747,10 @@ Set migration parameters - "compress-level": set compression level during migration (json-int) - "compress-threads": set compression thread count for migration (json-int) - "decompress-threads": set decompression thread count for migration (json-int) -- "x-cpu-throttle-initial": set initial percentage of time guest cpus are - throttled for auto-converge (json-int) -- "x-cpu-throttle-increment": set throttle increasing percentage for - auto-converge (json-int) +- "cpu-throttle-initial": set initial percentage of time guest cpus are + throttled for auto-converge (json-int) +- "cpu-throttle-increment": set throttle increasing percentage for + auto-converge (json-int) Arguments: @@ -3764,7 +3764,7 @@ EQMP { .name = "migrate-set-parameters", .args_type = - "compress-level:i?,compress-threads:i?,decompress-threads:i?,x-cpu-throttle-initial:i?,x-cpu-throttle-increment:i?", + "compress-level:i?,compress-threads:i?,decompress-threads:i?,cpu-throttle-initial:i?,cpu-throttle-increment:i?", .mhandler.cmd_new = qmp_marshal_migrate_set_parameters, }, SQMP @@ -3777,10 +3777,10 @@ Query current migration parameters - "compress-level" : compression level value (json-int) - "compress-threads" : compression thread count value (json-int) - "decompress-threads" : decompression thread count value (json-int) - - "x-cpu-throttle-initial" : initial percentage of time guest cpus are - throttled (json-int) - - "x-cpu-throttle-increment" : throttle increasing percentage for - auto-converge (json-int) + - "cpu-throttle-initial" : initial percentage of time guest cpus are + throttled (json-int) + - "cpu-throttle-increment" : throttle increasing percentage for + auto-converge (json-int) Arguments: @@ -3790,10 +3790,10 @@ Example: <- { "return": { "decompress-threads": 2, - "x-cpu-throttle-increment": 10, + "cpu-throttle-increment": 10, "compress-threads": 8, "compress-level": 1, - "x-cpu-throttle-initial": 20 + "cpu-throttle-initial": 20 } } -- 1.9.1