From nobody Sun May 5 15:35:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508910730096104.05879567934142; Tue, 24 Oct 2017 22:52:10 -0700 (PDT) Received: from localhost ([::1]:46629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Ebj-0002kq-Bk for importer@patchew.org; Wed, 25 Oct 2017 01:52:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EYe-0000sw-83 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7EYc-0004RG-2i for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43180) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7EYb-0004Pr-T6 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:50 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA7554A706 for ; Wed, 25 Oct 2017 05:48:48 +0000 (UTC) Received: from secure.mitica (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8AAFF5D9CB; Wed, 25 Oct 2017 05:48:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DA7554A706 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=quintela@redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 07:48:38 +0200 Message-Id: <20171025054842.24883-2-quintela@redhat.com> In-Reply-To: <20171025054842.24883-1-quintela@redhat.com> References: <20171025054842.24883-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 25 Oct 2017 05:48:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 1/5] migration: Make sure that we pass the right cache size 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: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Instead of passing silently round down the number of pages, make it an error that the cache size is not a power of 2. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/page_cache.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/migration/page_cache.c b/migration/page_cache.c index 9a9d13d6a2..96268c3aea 100644 --- a/migration/page_cache.c +++ b/migration/page_cache.c @@ -58,6 +58,13 @@ PageCache *cache_init(int64_t new_size, size_t page_size= , Error **errp) return NULL; } =20 + /* round down to the nearest power of 2 */ + if (!is_power_of_2(num_pages)) { + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "cache size", + "is not a power of two number of pages"); + return NULL; + } + /* We prefer not to abort if there is no memory */ cache =3D g_try_malloc(sizeof(*cache)); if (!cache) { @@ -65,11 +72,6 @@ PageCache *cache_init(int64_t new_size, size_t page_size= , Error **errp) "Failed to allocate cache"); return NULL; } - /* round down to the nearest power of 2 */ - if (!is_power_of_2(num_pages)) { - num_pages =3D pow2floor(num_pages); - DPRINTF("rounding down to %" PRId64 "\n", num_pages); - } cache->page_size =3D page_size; cache->num_items =3D 0; cache->max_num_items =3D num_pages; --=20 2.13.6 From nobody Sun May 5 15:35:26 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508910623547737.1121526229684; Tue, 24 Oct 2017 22:50:23 -0700 (PDT) Received: from localhost ([::1]:46620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EZz-0001VY-Mm for importer@patchew.org; Wed, 25 Oct 2017 01:50:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EYe-0000sx-Pb for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7EYd-0004SQ-Ug for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52684) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7EYd-0004SC-OY for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:51 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B27A883A0 for ; Wed, 25 Oct 2017 05:48:50 +0000 (UTC) Received: from secure.mitica (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B1905D9CB; Wed, 25 Oct 2017 05:48:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8B27A883A0 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=quintela@redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 07:48:39 +0200 Message-Id: <20171025054842.24883-3-quintela@redhat.com> In-Reply-To: <20171025054842.24883-1-quintela@redhat.com> References: <20171025054842.24883-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 25 Oct 2017 05:48:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 2/5] migration: Don't play games with the requested cache size 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: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now that we check that the value passed is a power of 2, we don't need to play games when comparing what is the size that is going to take the cache. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 7f6327f708..42f3b7cb28 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -136,12 +136,14 @@ int64_t xbzrle_cache_resize(int64_t new_size, Error *= *errp) return -1; } =20 + if (new_size =3D=3D migrate_xbzrle_cache_size()) { + /* nothing to do */ + return new_size; + } + XBZRLE_cache_lock(); =20 if (XBZRLE.cache !=3D NULL) { - if (pow2floor(new_size) =3D=3D migrate_xbzrle_cache_size()) { - goto out_new_size; - } new_cache =3D cache_init(new_size, TARGET_PAGE_SIZE, errp); if (!new_cache) { ret =3D -1; @@ -152,8 +154,7 @@ int64_t xbzrle_cache_resize(int64_t new_size, Error **e= rrp) XBZRLE.cache =3D new_cache; } =20 -out_new_size: - ret =3D pow2floor(new_size); + ret =3D new_size; out: XBZRLE_cache_unlock(); return ret; --=20 2.13.6 From nobody Sun May 5 15:35:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508910730658156.90825772591802; Tue, 24 Oct 2017 22:52:10 -0700 (PDT) Received: from localhost ([::1]:46630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Ebm-0002na-Pe for importer@patchew.org; Wed, 25 Oct 2017 01:52:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EYg-0000tD-Fx for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7EYf-0004TV-Es for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40750) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7EYf-0004Sw-7R for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:53 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EB5433A168 for ; Wed, 25 Oct 2017 05:48:52 +0000 (UTC) Received: from secure.mitica (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id E17D95DA60; Wed, 25 Oct 2017 05:48:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3EB5433A168 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=quintela@redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 07:48:40 +0200 Message-Id: <20171025054842.24883-4-quintela@redhat.com> In-Reply-To: <20171025054842.24883-1-quintela@redhat.com> References: <20171025054842.24883-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 25 Oct 2017 05:48:52 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 3/5] migration: No need to return the size of the cache 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: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" After the previous commits, we make sure that the value passed is right, or we just drop an error. So now we return if there is one error or we have setup correctly the value passed. Signed-off-by: Juan Quintela -- Improve error messasge Return 0 always for success Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 6 ++---- migration/ram.c | 10 ++++------ migration/ram.h | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 62761d5705..6bbd4715d3 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1406,14 +1406,12 @@ void qmp_migrate_continue(MigrationStatus state, Er= ror **errp) void qmp_migrate_set_cache_size(int64_t value, Error **errp) { MigrationState *s =3D migrate_get_current(); - int64_t new_size; =20 - new_size =3D xbzrle_cache_resize(value, errp); - if (new_size < 0) { + if (xbzrle_cache_resize(value, errp) < 0) { return; } =20 - s->xbzrle_cache_size =3D new_size; + s->xbzrle_cache_size =3D value; } =20 int64_t qmp_query_migrate_cache_size(Error **errp) diff --git a/migration/ram.c b/migration/ram.c index 42f3b7cb28..997340c7c2 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -112,15 +112,15 @@ static void XBZRLE_cache_unlock(void) * migration may be using the cache and might finish during this call, * hence changes to the cache are protected by XBZRLE.lock(). * - * Returns the new_size or negative in case of error. + * Returns 0 for success or -1 for error * * @new_size: new cache size * @errp: set *errp if the check failed, with reason */ -int64_t xbzrle_cache_resize(int64_t new_size, Error **errp) +int xbzrle_cache_resize(int64_t new_size, Error **errp) { PageCache *new_cache; - int64_t ret; + int64_t ret =3D 0; =20 /* Check for truncation */ if (new_size !=3D (size_t)new_size) { @@ -138,7 +138,7 @@ int64_t xbzrle_cache_resize(int64_t new_size, Error **e= rrp) =20 if (new_size =3D=3D migrate_xbzrle_cache_size()) { /* nothing to do */ - return new_size; + return 0; } =20 XBZRLE_cache_lock(); @@ -153,8 +153,6 @@ int64_t xbzrle_cache_resize(int64_t new_size, Error **e= rrp) cache_fini(XBZRLE.cache); XBZRLE.cache =3D new_cache; } - - ret =3D new_size; out: XBZRLE_cache_unlock(); return ret; diff --git a/migration/ram.h b/migration/ram.h index f9f7eef894..64d81e9f1d 100644 --- a/migration/ram.h +++ b/migration/ram.h @@ -35,7 +35,7 @@ extern MigrationStats ram_counters; extern XBZRLECacheStats xbzrle_counters; =20 -int64_t xbzrle_cache_resize(int64_t new_size, Error **errp); +int xbzrle_cache_resize(int64_t new_size, Error **errp); uint64_t ram_bytes_remaining(void); uint64_t ram_bytes_total(void); =20 --=20 2.13.6 From nobody Sun May 5 15:35:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508910807952785.4969216123144; Tue, 24 Oct 2017 22:53:27 -0700 (PDT) Received: from localhost ([::1]:46633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Ed0-0003eA-36 for importer@patchew.org; Wed, 25 Oct 2017 01:53:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EYi-0000uJ-GF for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7EYh-0004UX-5Y for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43326) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7EYg-0004U3-SM for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:55 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3654CD276 for ; Wed, 25 Oct 2017 05:48:53 +0000 (UTC) Received: from secure.mitica (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93A4C5D9CB; Wed, 25 Oct 2017 05:48:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E3654CD276 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=quintela@redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 07:48:41 +0200 Message-Id: <20171025054842.24883-5-quintela@redhat.com> In-Reply-To: <20171025054842.24883-1-quintela@redhat.com> References: <20171025054842.24883-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 25 Oct 2017 05:48:54 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 4/5] migration: Make xbzrle_cache_size a migration 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: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Right now it is a variable in MigrationState instead of a MigrationParameter. The change allows to set it as the rest of the Migration parameters, from the command line, with query_migration_paramters, set_migrate_parameters, etc. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- hmp.c | 14 ++++++++++++++ migration/migration.c | 43 ++++++++++++++++++++++++++++++++----------- migration/migration.h | 1 - migration/ram.c | 7 ------- qapi/migration.json | 26 +++++++++++++++++++++++--- 5 files changed, 69 insertions(+), 22 deletions(-) diff --git a/hmp.c b/hmp.c index 41fcce6f5a..a01be50daa 100644 --- a/hmp.c +++ b/hmp.c @@ -342,6 +342,9 @@ void hmp_info_migrate_parameters(Monitor *mon, const QD= ict *qdict) monitor_printf(mon, "%s: %" PRId64 "\n", MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUN= T), params->x_multifd_page_count); + monitor_printf(mon, "%s: %" PRId64 "\n", + MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE), + params->xbzrle_cache_size); } =20 qapi_free_MigrationParameters(params); @@ -1578,6 +1581,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QD= ict *qdict) Visitor *v =3D string_input_visitor_new(valuestr); MigrateSetParameters *p =3D g_new0(MigrateSetParameters, 1); uint64_t valuebw =3D 0; + uint64_t cache_size; Error *err =3D NULL; int val, ret; =20 @@ -1653,6 +1657,16 @@ void hmp_migrate_set_parameter(Monitor *mon, const Q= Dict *qdict) 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); + if (err || cache_size > INT64_MAX + || (size_t)cache_size !=3D cache_size) { + error_setg(&err, "Invalid size %s", valuestr); + break; + } + p->xbzrle_cache_size =3D cache_size; + break; default: assert(0); } diff --git a/migration/migration.c b/migration/migration.c index 6bbd4715d3..4de3b551fe 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -71,7 +71,7 @@ #define DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT 10 =20 /* Migration XBZRLE default cache size */ -#define DEFAULT_MIGRATE_CACHE_SIZE (64 * 1024 * 1024) +#define DEFAULT_MIGRATE_XBZRLE_CACHE_SIZE (64 * 1024 * 1024) =20 /* The delay time (in ms) between two COLO checkpoints * Note: Please change this default value to 10000 when we support hybrid = mode. @@ -515,6 +515,8 @@ MigrationParameters *qmp_query_migrate_parameters(Error= **errp) 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; =20 return params; } @@ -817,6 +819,16 @@ static bool migrate_params_check(MigrationParameters *= params, Error **errp) return false; } =20 + if (params->has_xbzrle_cache_size && + (params->xbzrle_cache_size < qemu_target_page_size() || + !is_power_of_2(params->xbzrle_cache_size))) { + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + "xbzrle_cache_size", + "is invalid, it should be bigger than target page size" + " and a power of two"); + return false; + } + return true; } =20 @@ -878,9 +890,12 @@ static void migrate_params_test_apply(MigrateSetParame= ters *params, 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; + } } =20 -static void migrate_params_apply(MigrateSetParameters *params) +static void migrate_params_apply(MigrateSetParameters *params, Error **err= p) { MigrationState *s =3D migrate_get_current(); =20 @@ -946,6 +961,10 @@ static void migrate_params_apply(MigrateSetParameters = *params) 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); + } } =20 void qmp_migrate_set_parameters(MigrateSetParameters *params, Error **errp) @@ -974,7 +993,7 @@ void qmp_migrate_set_parameters(MigrateSetParameters *p= arams, Error **errp) return; } =20 - migrate_params_apply(params); + migrate_params_apply(params, errp); } =20 =20 @@ -1405,13 +1424,12 @@ void qmp_migrate_continue(MigrationStatus state, Er= ror **errp) =20 void qmp_migrate_set_cache_size(int64_t value, Error **errp) { - MigrationState *s =3D migrate_get_current(); + MigrateSetParameters p =3D { + .has_xbzrle_cache_size =3D true, + .xbzrle_cache_size =3D value, + }; =20 - if (xbzrle_cache_resize(value, errp) < 0) { - return; - } - - s->xbzrle_cache_size =3D value; + qmp_migrate_set_parameters(&p, errp); } =20 int64_t qmp_query_migrate_cache_size(Error **errp) @@ -1587,7 +1605,7 @@ int64_t migrate_xbzrle_cache_size(void) =20 s =3D migrate_get_current(); =20 - return s->xbzrle_cache_size; + return s->parameters.xbzrle_cache_size; } =20 bool migrate_use_block(void) @@ -2405,6 +2423,9 @@ static Property migration_properties[] =3D { DEFINE_PROP_INT64("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), =20 /* Migration capabilities */ DEFINE_PROP_MIG_CAP("x-xbzrle", MIGRATION_CAPABILITY_XBZRLE), @@ -2448,7 +2469,6 @@ static void migration_instance_init(Object *obj) MigrationParameters *params =3D &ms->parameters; =20 ms->state =3D MIGRATION_STATUS_NONE; - ms->xbzrle_cache_size =3D DEFAULT_MIGRATE_CACHE_SIZE; ms->mbps =3D -1; qemu_sem_init(&ms->pause_sem, 0); qemu_mutex_init(&ms->error_mutex); @@ -2468,6 +2488,7 @@ static void migration_instance_init(Object *obj) 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; } =20 /* diff --git a/migration/migration.h b/migration/migration.h index 8ccdd7a577..663415fe48 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -107,7 +107,6 @@ struct MigrationState int64_t downtime; int64_t expected_downtime; bool enabled_capabilities[MIGRATION_CAPABILITY__MAX]; - int64_t xbzrle_cache_size; int64_t setup_time; =20 /* Flag set once the migration has been asked to enter postcopy */ diff --git a/migration/ram.c b/migration/ram.c index 997340c7c2..8620aa400a 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -129,13 +129,6 @@ int xbzrle_cache_resize(int64_t new_size, Error **errp) return -1; } =20 - /* Cache should not be larger than guest ram size */ - if (new_size > ram_bytes_total()) { - error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "cache size", - "exceeds guest ram size"); - return -1; - } - if (new_size =3D=3D migrate_xbzrle_cache_size()) { /* nothing to do */ return 0; diff --git a/qapi/migration.json b/qapi/migration.json index 6ae866e1aa..bbc4671ded 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -483,6 +483,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 +# (Since 2.11) +# # Since: 2.4 ## { 'enum': 'MigrationParameter', @@ -490,7 +495,8 @@ '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', 'x-multifd-page-count', + 'xbzrle-cache-size' ] } =20 ## # @MigrateSetParameters: @@ -554,6 +560,10 @@ # @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 +# (Since 2.11) # Since: 2.4 ## # TODO either fuse back into MigrationParameters, or make @@ -571,7 +581,8 @@ '*x-checkpoint-delay': 'int', '*block-incremental': 'bool', '*x-multifd-channels': 'int', - '*x-multifd-page-count': 'int' } } + '*x-multifd-page-count': 'int', + '*xbzrle-cache-size': 'size' } } =20 ## # @migrate-set-parameters: @@ -650,6 +661,10 @@ # @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 +# (Since 2.11) # Since: 2.4 ## { 'struct': 'MigrationParameters', @@ -665,7 +680,8 @@ '*x-checkpoint-delay': 'int', '*block-incremental': 'bool' , '*x-multifd-channels': 'int', - '*x-multifd-page-count': 'int' } } + '*x-multifd-page-count': 'int', + '*xbzrle-cache-size': 'size' } } =20 ## # @query-migrate-parameters: @@ -947,6 +963,8 @@ # # Returns: nothing on success # +# Notes: This command is deprecated in favor of 'migrate-set-parameters' +# # Since: 1.2 # # Example: @@ -965,6 +983,8 @@ # # Returns: XBZRLE cache size in bytes # +# Notes: This command is deprecated in favor of 'query-migrate-parameters' +# # Since: 1.2 # # Example: --=20 2.13.6 From nobody Sun May 5 15:35:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508910875095800.3232152968474; Tue, 24 Oct 2017 22:54:35 -0700 (PDT) Received: from localhost ([::1]:46635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Ee5-0004E0-9v for importer@patchew.org; Wed, 25 Oct 2017 01:54:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7EYl-0000wb-2Q for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7EYi-0004Wh-V7 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58014) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7EYi-0004VJ-M2 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 01:48:56 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9435579704 for ; Wed, 25 Oct 2017 05:48:55 +0000 (UTC) Received: from secure.mitica (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 458455D9CB; Wed, 25 Oct 2017 05:48:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9435579704 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=quintela@redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 07:48:42 +0200 Message-Id: <20171025054842.24883-6-quintela@redhat.com> In-Reply-To: <20171025054842.24883-1-quintela@redhat.com> References: <20171025054842.24883-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 25 Oct 2017 05:48:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 5/5] migration: [RFC] Use proper types in json 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: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We use int for everything (int64_t), and then we check that value is between 0 and 255. Change it to the valid types. For qmp, the only real change is that now max_bandwidth allows to use the k/M/G suffixes. Signed-off-by: Juan Quintela --- hmp.c | 22 +++++++++++----------- migration/migration.c | 49 ++++++++++++++++++++---------------------------= -- qapi/migration.json | 20 ++++++++++---------- 3 files changed, 41 insertions(+), 50 deletions(-) diff --git a/hmp.c b/hmp.c index a01be50daa..7670f102c3 100644 --- a/hmp.c +++ b/hmp.c @@ -293,23 +293,23 @@ void hmp_info_migrate_parameters(Monitor *mon, const = QDict *qdict) =20 if (params) { assert(params->has_compress_level); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_LEVEL), params->compress_level); assert(params->has_compress_threads); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_THREADS), params->compress_threads); assert(params->has_decompress_threads); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_DECOMPRESS_THREADS), params->decompress_threads); assert(params->has_cpu_throttle_initial); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_CPU_THROTTLE_INITIA= L), params->cpu_throttle_initial); assert(params->has_cpu_throttle_increment); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_CPU_THROTTLE_INCREM= ENT), params->cpu_throttle_increment); assert(params->has_tls_creds); @@ -321,28 +321,28 @@ void hmp_info_migrate_parameters(Monitor *mon, const = QDict *qdict) MigrationParameter_str(MIGRATION_PARAMETER_TLS_HOSTNAME), params->tls_hostname); assert(params->has_max_bandwidth); - monitor_printf(mon, "%s: %" PRId64 " bytes/second\n", + monitor_printf(mon, "%s: %" PRIu64 " bytes/second\n", MigrationParameter_str(MIGRATION_PARAMETER_MAX_BANDWIDTH), params->max_bandwidth); assert(params->has_downtime_limit); - monitor_printf(mon, "%s: %" PRId64 " milliseconds\n", + monitor_printf(mon, "%s: %" PRIu64 " milliseconds\n", MigrationParameter_str(MIGRATION_PARAMETER_DOWNTIME_LIMIT), params->downtime_limit); assert(params->has_x_checkpoint_delay); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_X_CHECKPOINT_DELAY), params->x_checkpoint_delay); assert(params->has_block_incremental); monitor_printf(mon, "%s: %s\n", MigrationParameter_str(MIGRATION_PARAMETER_BLOCK_INCREMENTAL), params->block_incremental ? "on" : "off"); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_CHANNELS), params->x_multifd_channels); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUN= T), params->x_multifd_page_count); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %" PRIu64 "\n", MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE), params->xbzrle_cache_size); } diff --git a/migration/migration.c b/migration/migration.c index 4de3b551fe..8d2372394c 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -741,22 +741,20 @@ void qmp_migrate_set_capabilities(MigrationCapability= StatusList *params, static bool migrate_params_check(MigrationParameters *params, Error **errp) { if (params->has_compress_level && - (params->compress_level < 0 || params->compress_level > 9)) { + (params->compress_level > 9)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_level", "is invalid, it should be in the range of 0 to 9"); return false; } =20 - if (params->has_compress_threads && - (params->compress_threads < 1 || params->compress_threads > 255)) { + if (params->has_compress_threads && (params->compress_threads < 1)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_threads", "is invalid, it should be in the range of 1 to 255"); return false; } =20 - if (params->has_decompress_threads && - (params->decompress_threads < 1 || params->decompress_threads > 25= 5)) { + if (params->has_decompress_threads && (params->decompress_threads < 1)= ) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "decompress_threads", "is invalid, it should be in the range of 1 to 255"); @@ -781,38 +779,31 @@ static bool migrate_params_check(MigrationParameters = *params, Error **errp) return false; } =20 - if (params->has_max_bandwidth && - (params->max_bandwidth < 0 || params->max_bandwidth > SIZE_MAX)) { + if (params->has_max_bandwidth && (params->max_bandwidth > SIZE_MAX)) { error_setg(errp, "Parameter 'max_bandwidth' expects an integer in = the" " range of 0 to %zu bytes/second", SIZE_MAX); return false; } =20 if (params->has_downtime_limit && - (params->downtime_limit < 0 || - params->downtime_limit > MAX_MIGRATE_DOWNTIME)) { + (params->downtime_limit > MAX_MIGRATE_DOWNTIME)) { error_setg(errp, "Parameter 'downtime_limit' expects an integer in= " "the range of 0 to %d milliseconds", MAX_MIGRATE_DOWNTIME); return false; } =20 - if (params->has_x_checkpoint_delay && (params->x_checkpoint_delay < 0)= ) { - error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "x_checkpoint_delay", - "is invalid, it should be positive"); - return false; - } - if (params->has_x_multifd_channels && - (params->x_multifd_channels < 1 || params->x_multifd_channels > 25= 5)) { + /* x_checkpoint_delay is now always positive */ + + if (params->has_x_multifd_channels && (params->x_multifd_channels < 1)= ) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "multifd_channels", "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)) { + (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"); @@ -2394,33 +2385,33 @@ static Property migration_properties[] =3D { send_section_footer, true), =20 /* Migration parameters */ - DEFINE_PROP_INT64("x-compress-level", MigrationState, + DEFINE_PROP_UINT8("x-compress-level", MigrationState, parameters.compress_level, DEFAULT_MIGRATE_COMPRESS_LEVEL), - DEFINE_PROP_INT64("x-compress-threads", MigrationState, + DEFINE_PROP_UINT8("x-compress-threads", MigrationState, parameters.compress_threads, DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT), - DEFINE_PROP_INT64("x-decompress-threads", MigrationState, + DEFINE_PROP_UINT8("x-decompress-threads", MigrationState, parameters.decompress_threads, DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT), - DEFINE_PROP_INT64("x-cpu-throttle-initial", MigrationState, + DEFINE_PROP_UINT8("x-cpu-throttle-initial", MigrationState, parameters.cpu_throttle_initial, DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL), - DEFINE_PROP_INT64("x-cpu-throttle-increment", MigrationState, + DEFINE_PROP_UINT8("x-cpu-throttle-increment", MigrationState, parameters.cpu_throttle_increment, DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT), - DEFINE_PROP_INT64("x-max-bandwidth", MigrationState, + DEFINE_PROP_SIZE("x-max-bandwidth", MigrationState, parameters.max_bandwidth, MAX_THROTTLE), - DEFINE_PROP_INT64("x-downtime-limit", MigrationState, + DEFINE_PROP_UINT64("x-downtime-limit", MigrationState, parameters.downtime_limit, DEFAULT_MIGRATE_SET_DOWNTIME), - DEFINE_PROP_INT64("x-checkpoint-delay", MigrationState, + DEFINE_PROP_UINT32("x-checkpoint-delay", MigrationState, parameters.x_checkpoint_delay, DEFAULT_MIGRATE_X_CHECKPOINT_DELAY), - DEFINE_PROP_INT64("x-multifd-channels", MigrationState, + DEFINE_PROP_UINT8("x-multifd-channels", MigrationState, parameters.x_multifd_channels, DEFAULT_MIGRATE_MULTIFD_CHANNELS), - DEFINE_PROP_INT64("x-multifd-page-count", MigrationState, + 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, diff --git a/qapi/migration.json b/qapi/migration.json index bbc4671ded..ca4563dbd7 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -668,19 +668,19 @@ # Since: 2.4 ## { 'struct': 'MigrationParameters', - 'data': { '*compress-level': 'int', - '*compress-threads': 'int', - '*decompress-threads': 'int', - '*cpu-throttle-initial': 'int', - '*cpu-throttle-increment': 'int', + 'data': { '*compress-level': 'uint8', + '*compress-threads': 'uint8', + '*decompress-threads': 'uint8', + '*cpu-throttle-initial': 'uint8', + '*cpu-throttle-increment': 'uint8', '*tls-creds': 'str', '*tls-hostname': 'str', - '*max-bandwidth': 'int', - '*downtime-limit': 'int', - '*x-checkpoint-delay': 'int', + '*max-bandwidth': 'size', + '*downtime-limit': 'uint64', + '*x-checkpoint-delay': 'uint32', '*block-incremental': 'bool' , - '*x-multifd-channels': 'int', - '*x-multifd-page-count': 'int', + '*x-multifd-channels': 'uint8', + '*x-multifd-page-count': 'uint32', '*xbzrle-cache-size': 'size' } } =20 ## --=20 2.13.6