From nobody Mon Feb 9 08:31:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549459829856621.3665246327787; Wed, 6 Feb 2019 05:30:29 -0800 (PST) Received: from localhost ([127.0.0.1]:51039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grNHT-00038f-TY for importer@patchew.org; Wed, 06 Feb 2019 08:30:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grNBG-0006Wq-9l for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:23:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grNBF-0007eZ-Jj for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:23:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43220) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grNBF-0007eT-Ef for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:23:57 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9BCF7F6C8 for ; Wed, 6 Feb 2019 13:23:56 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.118.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC21061538; Wed, 6 Feb 2019 13:23:51 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 14:23:28 +0100 Message-Id: <20190206132331.1694-2-quintela@redhat.com> In-Reply-To: <20190206132331.1694-1-quintela@redhat.com> References: <20190206132331.1694-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 06 Feb 2019 13:23:56 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 1/4] multifd: Change page count default to 128 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: Laurent Vivier , Thomas Huth , Juan Quintela , Markus Armbruster , "Dr. David Alan Gilbert" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" I haven't seend any problem about using 64 or 128. And it make much less contention on the locks. Just change it. Signed-off-by: Juan Quintela --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index ef1d53cde2..f673486679 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -81,7 +81,7 @@ /* The delay time (in ms) between two COLO checkpoints */ #define DEFAULT_MIGRATE_X_CHECKPOINT_DELAY (200 * 100) #define DEFAULT_MIGRATE_MULTIFD_CHANNELS 2 -#define DEFAULT_MIGRATE_MULTIFD_PAGE_COUNT 16 +#define DEFAULT_MIGRATE_MULTIFD_PAGE_COUNT 128 =20 /* Background transfer rate for postcopy, 0 means unlimited, note * that page requests can still exceed this limit. --=20 2.20.1 From nobody Mon Feb 9 08:31:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 154945956003955.587934554100116; Wed, 6 Feb 2019 05:26:00 -0800 (PST) Received: from localhost ([127.0.0.1]:50946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grND8-0007mi-0c for importer@patchew.org; Wed, 06 Feb 2019 08:25:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grNBZ-0006mm-3u for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grNBS-0007iR-OA for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51788) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grNBS-0007iE-9Z for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:10 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91E5E58E59 for ; Wed, 6 Feb 2019 13:24:09 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.118.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2017361538; Wed, 6 Feb 2019 13:23:56 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 14:23:29 +0100 Message-Id: <20190206132331.1694-3-quintela@redhat.com> In-Reply-To: <20190206132331.1694-1-quintela@redhat.com> References: <20190206132331.1694-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 06 Feb 2019 13:24:09 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 2/4] multifd: Drop x-multifd-page-count parameter 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: Laurent Vivier , Thomas Huth , Juan Quintela , Markus Armbruster , "Dr. David Alan Gilbert" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Libvirt don't want to expose (and explain it). And testing looks like 128 is good for all use cases, so just drop it. Signed-off-by: Juan Quintela --- hmp.c | 7 ------- migration/migration.c | 30 ------------------------------ migration/migration.h | 1 - migration/ram.c | 13 ++++++++----- qapi/migration.json | 13 +------------ 5 files changed, 9 insertions(+), 55 deletions(-) diff --git a/hmp.c b/hmp.c index 63019729ed..73b8443a8e 100644 --- a/hmp.c +++ b/hmp.c @@ -426,9 +426,6 @@ void hmp_info_migrate_parameters(Monitor *mon, const QD= ict *qdict) monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_CHANNELS), params->x_multifd_channels); - monitor_printf(mon, "%s: %u\n", - MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUN= T), - params->x_multifd_page_count); monitor_printf(mon, "%s: %" PRIu64 "\n", MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE), params->xbzrle_cache_size); @@ -1776,10 +1773,6 @@ void hmp_migrate_set_parameter(Monitor *mon, const Q= Dict *qdict) p->has_x_multifd_channels =3D true; visit_type_int(v, param, &p->x_multifd_channels, &err); break; - case MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUNT: - p->has_x_multifd_page_count =3D true; - visit_type_int(v, param, &p->x_multifd_page_count, &err); - break; case MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE: p->has_xbzrle_cache_size =3D true; visit_type_size(v, param, &cache_size, &err); diff --git a/migration/migration.c b/migration/migration.c index f673486679..65df9b566e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -81,7 +81,6 @@ /* The delay time (in ms) between two COLO checkpoints */ #define DEFAULT_MIGRATE_X_CHECKPOINT_DELAY (200 * 100) #define DEFAULT_MIGRATE_MULTIFD_CHANNELS 2 -#define DEFAULT_MIGRATE_MULTIFD_PAGE_COUNT 128 =20 /* Background transfer rate for postcopy, 0 means unlimited, note * that page requests can still exceed this limit. @@ -749,8 +748,6 @@ MigrationParameters *qmp_query_migrate_parameters(Error= **errp) params->block_incremental =3D s->parameters.block_incremental; params->has_x_multifd_channels =3D true; params->x_multifd_channels =3D s->parameters.x_multifd_channels; - params->has_x_multifd_page_count =3D true; - params->x_multifd_page_count =3D s->parameters.x_multifd_page_count; params->has_xbzrle_cache_size =3D true; params->xbzrle_cache_size =3D s->parameters.xbzrle_cache_size; params->has_max_postcopy_bandwidth =3D true; @@ -1112,14 +1109,6 @@ static bool migrate_params_check(MigrationParameters= *params, Error **errp) "is invalid, it should be in the range of 1 to 255"); return false; } - if (params->has_x_multifd_page_count && - (params->x_multifd_page_count < 1 || - params->x_multifd_page_count > 10000)) { - error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "multifd_page_count", - "is invalid, it should be in the range of 1 to 10000"); - return false; - } =20 if (params->has_xbzrle_cache_size && (params->xbzrle_cache_size < qemu_target_page_size() || @@ -1202,9 +1191,6 @@ static void migrate_params_test_apply(MigrateSetParam= eters *params, if (params->has_x_multifd_channels) { dest->x_multifd_channels =3D params->x_multifd_channels; } - if (params->has_x_multifd_page_count) { - dest->x_multifd_page_count =3D params->x_multifd_page_count; - } if (params->has_xbzrle_cache_size) { dest->xbzrle_cache_size =3D params->xbzrle_cache_size; } @@ -1283,9 +1269,6 @@ static void migrate_params_apply(MigrateSetParameters= *params, Error **errp) if (params->has_x_multifd_channels) { s->parameters.x_multifd_channels =3D params->x_multifd_channels; } - if (params->has_x_multifd_page_count) { - s->parameters.x_multifd_page_count =3D params->x_multifd_page_coun= t; - } if (params->has_xbzrle_cache_size) { s->parameters.xbzrle_cache_size =3D params->xbzrle_cache_size; xbzrle_cache_resize(params->xbzrle_cache_size, errp); @@ -2044,15 +2027,6 @@ int migrate_multifd_channels(void) return s->parameters.x_multifd_channels; } =20 -int migrate_multifd_page_count(void) -{ - MigrationState *s; - - s =3D migrate_get_current(); - - return s->parameters.x_multifd_page_count; -} - int migrate_use_xbzrle(void) { MigrationState *s; @@ -3286,9 +3260,6 @@ static Property migration_properties[] =3D { DEFINE_PROP_UINT8("x-multifd-channels", MigrationState, parameters.x_multifd_channels, DEFAULT_MIGRATE_MULTIFD_CHANNELS), - DEFINE_PROP_UINT32("x-multifd-page-count", MigrationState, - parameters.x_multifd_page_count, - DEFAULT_MIGRATE_MULTIFD_PAGE_COUNT), DEFINE_PROP_SIZE("xbzrle-cache-size", MigrationState, parameters.xbzrle_cache_size, DEFAULT_MIGRATE_XBZRLE_CACHE_SIZE), @@ -3366,7 +3337,6 @@ static void migration_instance_init(Object *obj) params->has_x_checkpoint_delay =3D true; params->has_block_incremental =3D true; params->has_x_multifd_channels =3D true; - params->has_x_multifd_page_count =3D true; params->has_xbzrle_cache_size =3D true; params->has_max_postcopy_bandwidth =3D true; params->has_max_cpu_throttle =3D true; diff --git a/migration/migration.h b/migration/migration.h index bd41b57af9..5e2b004a6c 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -269,7 +269,6 @@ bool migrate_auto_converge(void); bool migrate_use_multifd(void); bool migrate_pause_before_switchover(void); int migrate_multifd_channels(void); -int migrate_multifd_page_count(void); =20 int migrate_use_xbzrle(void); int64_t migrate_xbzrle_cache_size(void); diff --git a/migration/ram.c b/migration/ram.c index 59191c1ed2..ebe893e356 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -520,6 +520,9 @@ exit: =20 #define MULTIFD_FLAG_SYNC (1 << 0) =20 +#define MULTIFD_PAGE_COUNT 128 + + typedef struct { uint32_t magic; uint32_t version; @@ -718,7 +721,7 @@ static void multifd_send_fill_packet(MultiFDSendParams = *p) packet->magic =3D cpu_to_be32(MULTIFD_MAGIC); packet->version =3D cpu_to_be32(MULTIFD_VERSION); packet->flags =3D cpu_to_be32(p->flags); - packet->size =3D cpu_to_be32(migrate_multifd_page_count()); + packet->size =3D cpu_to_be32(MULTIFD_PAGE_COUNT); packet->used =3D cpu_to_be32(p->pages->used); packet->packet_num =3D cpu_to_be64(p->packet_num); =20 @@ -756,10 +759,10 @@ static int multifd_recv_unfill_packet(MultiFDRecvPara= ms *p, Error **errp) p->flags =3D be32_to_cpu(packet->flags); =20 packet->size =3D be32_to_cpu(packet->size); - if (packet->size > migrate_multifd_page_count()) { + if (packet->size > MULTIFD_PAGE_COUNT) { error_setg(errp, "multifd: received packet " "with size %d and expected maximum size %d", - packet->size, migrate_multifd_page_count()) ; + packet->size, MULTIFD_PAGE_COUNT) ; return -1; } =20 @@ -1085,7 +1088,7 @@ static void multifd_new_send_channel_async(QIOTask *t= ask, gpointer opaque) int multifd_save_setup(void) { int thread_count; - uint32_t page_count =3D migrate_multifd_page_count(); + uint32_t page_count =3D MULTIFD_PAGE_COUNT; uint8_t i; =20 if (!migrate_use_multifd()) { @@ -1281,7 +1284,7 @@ static void *multifd_recv_thread(void *opaque) int multifd_load_setup(void) { int thread_count; - uint32_t page_count =3D migrate_multifd_page_count(); + uint32_t page_count =3D MULTIFD_PAGE_COUNT; uint8_t i; =20 if (!migrate_use_multifd()) { diff --git a/qapi/migration.json b/qapi/migration.json index b62947791f..8c5db60406 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -547,9 +547,6 @@ # number of sockets used for migration. The # default value is 2 (since 2.11) # -# @x-multifd-page-count: Number of pages sent together to a thread. -# The default value is 16 (since 2.11) -# # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It # needs to be a multiple of the target page size # and a power of 2 @@ -569,7 +566,7 @@ 'cpu-throttle-initial', 'cpu-throttle-increment', 'tls-creds', 'tls-hostname', 'max-bandwidth', 'downtime-limit', 'x-checkpoint-delay', 'block-incremental', - 'x-multifd-channels', 'x-multifd-page-count', + 'x-multifd-channels', 'xbzrle-cache-size', 'max-postcopy-bandwidth', 'max-cpu-throttle' ] } =20 @@ -637,9 +634,6 @@ # number of sockets used for migration. The # default value is 2 (since 2.11) # -# @x-multifd-page-count: Number of pages sent together to a thread. -# The default value is 16 (since 2.11) -# # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It # needs to be a multiple of the target page size # and a power of 2 @@ -670,7 +664,6 @@ '*x-checkpoint-delay': 'int', '*block-incremental': 'bool', '*x-multifd-channels': 'int', - '*x-multifd-page-count': 'int', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', '*max-cpu-throttle': 'int' } } @@ -754,9 +747,6 @@ # number of sockets used for migration. # The default value is 2 (since 2.11) # -# @x-multifd-page-count: Number of pages sent together to a thread. -# The default value is 16 (since 2.11) -# # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It # needs to be a multiple of the target page size # and a power of 2 @@ -786,7 +776,6 @@ '*x-checkpoint-delay': 'uint32', '*block-incremental': 'bool' , '*x-multifd-channels': 'uint8', - '*x-multifd-page-count': 'uint32', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', '*max-cpu-throttle':'uint8'} } --=20 2.20.1 From nobody Mon Feb 9 08:31:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549459693617324.73035540219155; Wed, 6 Feb 2019 05:28:13 -0800 (PST) Received: from localhost ([127.0.0.1]:50979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grNFH-00016G-Al for importer@patchew.org; Wed, 06 Feb 2019 08:28:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grNBg-0006tZ-Vz for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grNBf-0007lH-Jo for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46214) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grNBf-0007l5-Bh for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:23 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 95596C0528BD for ; Wed, 6 Feb 2019 13:24:22 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.118.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4A6C61538; Wed, 6 Feb 2019 13:24:09 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 14:23:30 +0100 Message-Id: <20190206132331.1694-4-quintela@redhat.com> In-Reply-To: <20190206132331.1694-1-quintela@redhat.com> References: <20190206132331.1694-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 06 Feb 2019 13:24:22 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 3/4] multifd: Drop x- 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: Laurent Vivier , Thomas Huth , Juan Quintela , Markus Armbruster , "Dr. David Alan Gilbert" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We make it supported from now on. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- hmp.c | 10 +++++----- migration/migration.c | 26 +++++++++++++------------- qapi/migration.json | 34 +++++++++++++++++----------------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/hmp.c b/hmp.c index 73b8443a8e..0cafce9713 100644 --- a/hmp.c +++ b/hmp.c @@ -424,8 +424,8 @@ void hmp_info_migrate_parameters(Monitor *mon, const QD= ict *qdict) MigrationParameter_str(MIGRATION_PARAMETER_BLOCK_INCREMENTAL), params->block_incremental ? "on" : "off"); monitor_printf(mon, "%s: %u\n", - MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_CHANNELS), - params->x_multifd_channels); + MigrationParameter_str(MIGRATION_PARAMETER_MULTIFD_CHANNELS), + params->multifd_channels); monitor_printf(mon, "%s: %" PRIu64 "\n", MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE), params->xbzrle_cache_size); @@ -1769,9 +1769,9 @@ void hmp_migrate_set_parameter(Monitor *mon, const QD= ict *qdict) p->has_block_incremental =3D true; visit_type_bool(v, param, &p->block_incremental, &err); break; - case MIGRATION_PARAMETER_X_MULTIFD_CHANNELS: - p->has_x_multifd_channels =3D true; - visit_type_int(v, param, &p->x_multifd_channels, &err); + case MIGRATION_PARAMETER_MULTIFD_CHANNELS: + p->has_multifd_channels =3D true; + visit_type_int(v, param, &p->multifd_channels, &err); break; case MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE: p->has_xbzrle_cache_size =3D true; diff --git a/migration/migration.c b/migration/migration.c index 65df9b566e..c7dbc44562 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -746,8 +746,8 @@ MigrationParameters *qmp_query_migrate_parameters(Error= **errp) params->x_checkpoint_delay =3D s->parameters.x_checkpoint_delay; params->has_block_incremental =3D true; params->block_incremental =3D s->parameters.block_incremental; - params->has_x_multifd_channels =3D true; - params->x_multifd_channels =3D s->parameters.x_multifd_channels; + params->has_multifd_channels =3D true; + params->multifd_channels =3D s->parameters.multifd_channels; params->has_xbzrle_cache_size =3D true; params->xbzrle_cache_size =3D s->parameters.xbzrle_cache_size; params->has_max_postcopy_bandwidth =3D true; @@ -1103,7 +1103,7 @@ static bool migrate_params_check(MigrationParameters = *params, Error **errp) =20 /* x_checkpoint_delay is now always positive */ =20 - if (params->has_x_multifd_channels && (params->x_multifd_channels < 1)= ) { + if (params->has_multifd_channels && (params->multifd_channels < 1)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "multifd_channels", "is invalid, it should be in the range of 1 to 255"); @@ -1188,8 +1188,8 @@ static void migrate_params_test_apply(MigrateSetParam= eters *params, if (params->has_block_incremental) { dest->block_incremental =3D params->block_incremental; } - if (params->has_x_multifd_channels) { - dest->x_multifd_channels =3D params->x_multifd_channels; + if (params->has_multifd_channels) { + dest->multifd_channels =3D params->multifd_channels; } if (params->has_xbzrle_cache_size) { dest->xbzrle_cache_size =3D params->xbzrle_cache_size; @@ -1266,8 +1266,8 @@ static void migrate_params_apply(MigrateSetParameters= *params, Error **errp) if (params->has_block_incremental) { s->parameters.block_incremental =3D params->block_incremental; } - if (params->has_x_multifd_channels) { - s->parameters.x_multifd_channels =3D params->x_multifd_channels; + if (params->has_multifd_channels) { + s->parameters.multifd_channels =3D params->multifd_channels; } if (params->has_xbzrle_cache_size) { s->parameters.xbzrle_cache_size =3D params->xbzrle_cache_size; @@ -2005,7 +2005,7 @@ bool migrate_use_multifd(void) =20 s =3D migrate_get_current(); =20 - return s->enabled_capabilities[MIGRATION_CAPABILITY_X_MULTIFD]; + return s->enabled_capabilities[MIGRATION_CAPABILITY_MULTIFD]; } =20 bool migrate_pause_before_switchover(void) @@ -2024,7 +2024,7 @@ int migrate_multifd_channels(void) =20 s =3D migrate_get_current(); =20 - return s->parameters.x_multifd_channels; + return s->parameters.multifd_channels; } =20 int migrate_use_xbzrle(void) @@ -3257,8 +3257,8 @@ static Property migration_properties[] =3D { DEFINE_PROP_UINT32("x-checkpoint-delay", MigrationState, parameters.x_checkpoint_delay, DEFAULT_MIGRATE_X_CHECKPOINT_DELAY), - DEFINE_PROP_UINT8("x-multifd-channels", MigrationState, - parameters.x_multifd_channels, + DEFINE_PROP_UINT8("multifd-channels", MigrationState, + parameters.multifd_channels, DEFAULT_MIGRATE_MULTIFD_CHANNELS), DEFINE_PROP_SIZE("xbzrle-cache-size", MigrationState, parameters.xbzrle_cache_size, @@ -3282,7 +3282,7 @@ static Property migration_properties[] =3D { DEFINE_PROP_MIG_CAP("x-release-ram", MIGRATION_CAPABILITY_RELEASE_RAM), DEFINE_PROP_MIG_CAP("x-block", MIGRATION_CAPABILITY_BLOCK), DEFINE_PROP_MIG_CAP("x-return-path", MIGRATION_CAPABILITY_RETURN_PATH), - DEFINE_PROP_MIG_CAP("x-multifd", MIGRATION_CAPABILITY_X_MULTIFD), + DEFINE_PROP_MIG_CAP("x-multifd", MIGRATION_CAPABILITY_MULTIFD), =20 DEFINE_PROP_END_OF_LIST(), }; @@ -3336,7 +3336,7 @@ static void migration_instance_init(Object *obj) params->has_downtime_limit =3D true; params->has_x_checkpoint_delay =3D true; params->has_block_incremental =3D true; - params->has_x_multifd_channels =3D true; + params->has_multifd_channels =3D true; params->has_xbzrle_cache_size =3D true; params->has_max_postcopy_bandwidth =3D true; params->has_max_cpu_throttle =3D true; diff --git a/qapi/migration.json b/qapi/migration.json index 8c5db60406..c202703889 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -401,7 +401,7 @@ # @pause-before-switchover: Pause outgoing migration before serialising de= vice # state and before disabling block IO (since 2.11) # -# @x-multifd: Use more than one fd for migration (since 2.11) +# @multifd: Use more than one fd for migration (since 4.0) # # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps. # (since 2.12) @@ -418,7 +418,7 @@ { 'enum': 'MigrationCapability', 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', - 'block', 'return-path', 'pause-before-switchover', 'x-multifd', + 'block', 'return-path', 'pause-before-switchover', 'multifd', 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate' ] } =20 ## @@ -542,10 +542,10 @@ # migrated and the destination must already have access to the # same backing chain as was used on the source. (since 2.10) # -# @x-multifd-channels: Number of channels used to migrate data in -# parallel. This is the same number that the -# number of sockets used for migration. The -# default value is 2 (since 2.11) +# @multifd-channels: Number of channels used to migrate data in +# parallel. This is the same number that the +# number of sockets used for migration. The +# default value is 2 (since 4.0) # # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It # needs to be a multiple of the target page size @@ -566,7 +566,7 @@ 'cpu-throttle-initial', 'cpu-throttle-increment', 'tls-creds', 'tls-hostname', 'max-bandwidth', 'downtime-limit', 'x-checkpoint-delay', 'block-incremental', - 'x-multifd-channels', + 'multifd-channels', 'xbzrle-cache-size', 'max-postcopy-bandwidth', 'max-cpu-throttle' ] } =20 @@ -629,10 +629,10 @@ # migrated and the destination must already have access to the # same backing chain as was used on the source. (since 2.10) # -# @x-multifd-channels: Number of channels used to migrate data in -# parallel. This is the same number that the -# number of sockets used for migration. The -# default value is 2 (since 2.11) +# @multifd-channels: Number of channels used to migrate data in +# parallel. This is the same number that the +# number of sockets used for migration. The +# default value is 2 (since 4.0) # # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It # needs to be a multiple of the target page size @@ -663,7 +663,7 @@ '*downtime-limit': 'int', '*x-checkpoint-delay': 'int', '*block-incremental': 'bool', - '*x-multifd-channels': 'int', + '*multifd-channels': 'int', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', '*max-cpu-throttle': 'int' } } @@ -742,10 +742,10 @@ # migrated and the destination must already have access to the # same backing chain as was used on the source. (since 2.10) # -# @x-multifd-channels: Number of channels used to migrate data in -# parallel. This is the same number that the -# number of sockets used for migration. -# The default value is 2 (since 2.11) +# @multifd-channels: Number of channels used to migrate data in +# parallel. This is the same number that the +# number of sockets used for migration. +# The default value is 2 (since 4.0) # # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It # needs to be a multiple of the target page size @@ -775,7 +775,7 @@ '*downtime-limit': 'uint64', '*x-checkpoint-delay': 'uint32', '*block-incremental': 'bool' , - '*x-multifd-channels': 'uint8', + '*multifd-channels': 'uint8', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', '*max-cpu-throttle':'uint8'} } --=20 2.20.1 From nobody Mon Feb 9 08:31:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549459908247392.46400005658745; Wed, 6 Feb 2019 05:31:48 -0800 (PST) Received: from localhost ([127.0.0.1]:51049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grNIk-0003oU-9s for importer@patchew.org; Wed, 06 Feb 2019 08:31:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grNC4-0007Cs-PJ for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grNC3-0007rM-VH for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62676) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grNC3-0007qe-Pd for qemu-devel@nongnu.org; Wed, 06 Feb 2019 08:24:47 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E18CDC01DE08 for ; Wed, 6 Feb 2019 13:24:46 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.118.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id E826361F21; Wed, 6 Feb 2019 13:24:22 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 14:23:31 +0100 Message-Id: <20190206132331.1694-5-quintela@redhat.com> In-Reply-To: <20190206132331.1694-1-quintela@redhat.com> References: <20190206132331.1694-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 06 Feb 2019 13:24:46 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 4/4] tests: Add migration multifd test 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: Laurent Vivier , Thomas Huth , Juan Quintela , Markus Armbruster , "Dr. David Alan Gilbert" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We set multifd-channels. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela Acked-by: Thomas Huth --- tests/migration-test.c | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index a27f095b28..3e0e447f95 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -942,6 +942,53 @@ static void test_precopy_tcp(void) g_free(uri); } =20 +static void test_multifd_tcp(void) +{ + char *uri; + QTestState *from, *to; + + if (test_migrate_start(&from, &to, "tcp:127.0.0.1:0", false)) { + return; + } + + /* + * We want to pick a speed slow enough that the test completes + * quickly, but that it doesn't complete precopy even on a slow + * machine, so also set the downtime. + */ + /* 1 ms should make it not converge*/ + migrate_set_parameter(from, "downtime-limit", 1); + /* 1GB/s */ + migrate_set_parameter(from, "max-bandwidth", 1000000000); + + migrate_set_parameter(from, "multifd-channels", 2); + migrate_set_parameter(to, "multifd-channels", 2); + + migrate_set_capability(from, "multifd", "true"); + migrate_set_capability(to, "multifd", "true"); + /* Wait for the first serial output from the source */ + wait_for_serial("src_serial"); + + uri =3D migrate_get_socket_address(to, "socket-address"); + + migrate(from, uri, "{}"); + + wait_for_migration_pass(from); + + /* 300ms it should converge */ + migrate_set_parameter(from, "downtime-limit", 300); + + if (!got_stop) { + qtest_qmp_eventwait(from, "STOP"); + } + qtest_qmp_eventwait(to, "RESUME"); + + wait_for_serial("dest_serial"); + wait_for_migration_complete(from); + + test_migrate_end(from, to, true); +} + int main(int argc, char **argv) { char template[] =3D "/tmp/migration-test-XXXXXX"; @@ -995,6 +1042,7 @@ int main(int argc, char **argv) qtest_add_func("/migration/precopy/unix", test_precopy_unix); qtest_add_func("/migration/precopy/tcp", test_precopy_tcp); qtest_add_func("/migration/xbzrle/unix", test_xbzrle_unix); + qtest_add_func("/migration/multifd/tcp", test_multifd_tcp); =20 ret =3D g_test_run(); =20 --=20 2.20.1