From patchwork Mon May 23 17:19:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 625329 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rD55934LHz9sdn for ; Tue, 24 May 2016 03:24:45 +1000 (AEST) Received: from localhost ([::1]:49504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4tat-0002f9-3U for incoming@patchwork.ozlabs.org; Mon, 23 May 2016 13:24:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4tWV-0007ME-VF for qemu-devel@nongnu.org; Mon, 23 May 2016 13:20:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4tWT-0005TY-QQ for qemu-devel@nongnu.org; Mon, 23 May 2016 13:20:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4tWT-0005TM-I6 for qemu-devel@nongnu.org; Mon, 23 May 2016 13:20:09 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B50E46A; Mon, 23 May 2016 17:20:09 +0000 (UTC) Received: from localhost (ovpn-116-17.sin2.redhat.com [10.67.116.17]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4NHK61N017493; Mon, 23 May 2016 13:20:07 -0400 From: Amit Shah To: gkurz@linux.vnet.ibm.com, Markus Armbruster , jjherne@linux.vnet.ibm.com, Peter Maydell Date: Mon, 23 May 2016 22:49:45 +0530 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 23 May 2016 17:20:09 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/5] migration: Promote improved autoconverge commands out of experimental state X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amit Shah , qemu list , "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Jason J. Herne" 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 Message-Id: <1461262038-8197-1-git-send-email-jjherne@linux.vnet.ibm.com> Signed-off-by: Amit Shah --- 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 c08d9a6..12dbf5b 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 5e88080..d1ecb99 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -430,9 +430,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 94847e5..28801a2 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 } }