From nobody Fri May 16 03:21:16 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1501253887417849.4373653122725; Fri, 28 Jul 2017 07:58:07 -0700 (PDT) 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 6ECC38C4D; Fri, 28 Jul 2017 14:58:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19C1E6E918; Fri, 28 Jul 2017 14:58:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A65E54BB79; Fri, 28 Jul 2017 14:58:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6SEvR5t024060 for ; Fri, 28 Jul 2017 10:57:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id E53387E2EF; Fri, 28 Jul 2017 14:57:27 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC3477E2FF for ; Fri, 28 Jul 2017 14:57:24 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 2A90381229 for ; Fri, 28 Jul 2017 14:57:22 +0000 (UTC) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6SEul1I026959 for ; Fri, 28 Jul 2017 10:57:21 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0a-001b2d01.pphosted.com with ESMTP id 2c06bhmt4r-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 28 Jul 2017 10:57:21 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Jul 2017 08:57:20 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 28 Jul 2017 08:57:19 -0600 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v6SEvIcW8847788; Fri, 28 Jul 2017 07:57:18 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E584AC603E; Fri, 28 Jul 2017 08:57:17 -0600 (MDT) Received: from kofr2.aus.stglabs.ibm.com (unknown [9.40.193.43]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP id B449AC603C; Fri, 28 Jul 2017 08:57:17 -0600 (MDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6ECC38C4D Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6ECC38C4D DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2A90381229 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=seg@us.ibm.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2A90381229 From: "Scott Garfinkle" To: libvir-list@redhat.com Date: Fri, 28 Jul 2017 09:57:11 -0500 In-Reply-To: <1501253831-42824-1-git-send-email-seg@us.ibm.com> References: <1501253831-42824-1-git-send-email-seg@us.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17072814-8235-0000-0000-00000C03E111 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007441; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00894156; UDB=6.00447089; IPR=6.00674317; BA=6.00005495; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016424; XFM=3.00000015; UTC=2017-07-28 14:57:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17072814-8236-0000-0000-00003CF7814E Message-Id: <1501253831-42824-4-git-send-email-seg@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-28_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707280236 X-Greylist: Delayed for 72:23:18 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Jul 2017 14:57:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Jul 2017 14:57:23 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'seg@us.ibm.com' RCPT:'' X-RedHat-Spam-Score: -3.501 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Scott Garfinkle Subject: [libvirt] [PATCH v3 3/3] virsh: Add support for virDomainMigrateGetMaxDowntime X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com 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.27]); Fri, 28 Jul 2017 14:58:06 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Scott Garfinkle --- tools/virsh-domain.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tools/virsh.pod | 18 ++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 0684979..10fdd0f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10720,6 +10720,46 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vs= hCmd *cmd) } =20 /* + * "migrate-getmaxdowntime" command + */ +static const vshCmdInfo info_migrate_getmaxdowntime[] =3D { + {.name =3D "help", + .data =3D N_("get maximum tolerable downtime") + }, + {.name =3D "desc", + .data =3D N_("Get maximum tolerable downtime (in milliseconds)for a d= omain which is being live-migrated to another host.") + }, + {.name =3D NULL} +}; + +static const vshCmdOptDef opts_migrate_getmaxdowntime[] =3D { + VIRSH_COMMON_OPT_DOMAIN_FULL, + {.name =3D NULL} +}; + +static bool +cmdMigrateGetMaxDowntime(vshControl *ctl, const vshCmd *cmd) +{ + virDomainPtr dom =3D NULL; + unsigned long long downtime; + bool ret =3D false; + + if (!(dom =3D virshCommandOptDomain(ctl, cmd, NULL))) + return false; + + if (virDomainMigrateGetMaxDowntime(dom, &downtime, 0)) + goto done; + + vshPrint(ctl, "%llu\n", downtime); + + ret =3D true; + + done: + virshDomainFree(dom); + return ret; +} + +/* * "migrate-compcache" command */ static const vshCmdInfo info_migrate_compcache[] =3D { @@ -13845,6 +13885,12 @@ const vshCmdDef domManagementCmds[] =3D { .info =3D info_migrate_setmaxdowntime, .flags =3D 0 }, + {.name =3D "migrate-getmaxdowntime", + .handler =3D cmdMigrateGetMaxDowntime, + .opts =3D opts_migrate_getmaxdowntime, + .info =3D info_migrate_getmaxdowntime, + .flags =3D 0 + }, {.name =3D "migrate-compcache", .handler =3D cmdMigrateCompCache, .opts =3D opts_migrate_compcache, diff --git a/tools/virsh.pod b/tools/virsh.pod index 43d6f0c..fc0a46c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1869,6 +1869,24 @@ is supposed to be used while the domain is being liv= e-migrated as a reaction to migration progress and increasing number of compression cache misses obtained from domjobinfo. =20 +=3Ditem B I + +Get the maximum tolerable downtime for a domain which is being live-migrat= ed to +another host. This is the number of milliseconds the guest is allowed +to be down at the end of live migration. + +=3Ditem B I [I<--size> B] + +Sets and/or gets size of the cache (in bytes) used for compressing repeate= dly +transferred memory pages during live migration. When called without I, +the command just prints current size of the compression cache. When I +is specified, the hypervisor is asked to change compression cache to I +bytes and then the current size is printed (the result may differ from the +requested size due to rounding done by the hypervisor). The I option +is supposed to be used while the domain is being live-migrated as a reacti= on +to migration progress and increasing number of compression cache misses +obtained from domjobinfo. + =3Ditem B I I =20 Set the maximum migration bandwidth (in MiB/s) for a domain which is being --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list