From nobody Sun May 12 18:05:34 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1703136141682986.7273776398087; Wed, 20 Dec 2023 21:22:21 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9F9CA1BFB; Thu, 21 Dec 2023 00:22:20 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 30E9B1B6E; Thu, 21 Dec 2023 00:19:45 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 7BCAD1ABC; Thu, 21 Dec 2023 00:19:36 -0500 (EST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D38211ABD for ; Thu, 21 Dec 2023 00:19:35 -0500 (EST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1d3ed1ca402so3545925ad.2 for ; Wed, 20 Dec 2023 21:19:35 -0800 (PST) Received: from localhost.localdomain ([171.216.79.133]) by smtp.gmail.com with ESMTPSA id e12-20020a170902b78c00b001bb750189desm622742pls.255.2023.12.20.21.19.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 21:19:33 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703135974; x=1703740774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e21wMJ4iOy9kN/hO2KddOjJ/9izrrSWJUUAiP+MRfZY=; b=j6p5Cb9pMEUkvuGNKoHY9K1WwpAQrRgDJ1IlmdE/ezzTJC+nlUn3fqBcrPy+RT21eJ WGYdYeUMvrDJBWOJVs4Tx5GdqUSdWhEBx3AU4Zvaq1dMpjbLd50JTtWaFbj5fD5XOh5y +uslrTNAS5mMSTmrJdqfErJHsuodWo4KoP4RsNKeHpvdNl4yJfIun5bUcNfLvcNpL9KB gmR3SHO9WoIDVzuYQrjV0/bFre9VeVLdCB3NHAiOXevrpBkFRuO5vG2mMcvhEYwK7k+k OO8bIN9VXIKtBhj7REAETiPGEoNVW+1EcECw4x9+GMaymm9zGEPbwRXqUNfcA1iDDO2s iA/w== X-Gm-Message-State: AOJu0Yx6vv43NvAd+g2whbd3VpnlvY6LgDrEkL5TxsG/2N/+DuWdXfBS XI80eDtQeY0TLDXImU6RYe8YqQly+w6viHXbuXI1Ma0C X-Google-Smtp-Source: AGHT+IFPp7C7qvjnw80hOd++egSB9x+X7/pKnFHrN+xsMgc0UKyay+hLX/auupZH4AjQOLCXRAIeew== X-Received: by 2002:a17:902:ec92:b0:1d3:e36e:d6ac with SMTP id x18-20020a170902ec9200b001d3e36ed6acmr3870388plg.14.1703135973915; Wed, 20 Dec 2023 21:19:33 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v3 1/4] Add VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 21 Dec 2023 13:19:21 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: HEFAEPO77XMOOVSYXSU3SWX66OI5S4JS X-Message-ID-Hash: HEFAEPO77XMOOVSYXSU3SWX66OI5S4JS X-MailFrom: yong.huang@smartx.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: yong.huang@smartx.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1703136142330100001 The flag can be used to enable dirty-limit capability for live migration. Signed-off-by: Hyman Huang Message-Id: --- include/libvirt/libvirt-domain.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 30cce85b29..8a57232727 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1100,6 +1100,11 @@ typedef enum { * Since: 8.5.0 */ VIR_MIGRATE_ZEROCOPY =3D (1 << 20), + + /* Enable dirty-limit capability to make migration convergent. + * Since: 10.0.0 + */ + VIR_MIGRATE_DIRTY_LIMIT =3D (1 << 21), } virDomainMigrateFlags; =20 =20 --=20 2.39.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org From nobody Sun May 12 18:05:34 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 170313622716659.84368765522868; Wed, 20 Dec 2023 21:23:47 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 1B7E31BF6; Thu, 21 Dec 2023 00:23:46 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8C9D81C3B; Thu, 21 Dec 2023 00:19:54 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id B66D71ABC; Thu, 21 Dec 2023 00:19:38 -0500 (EST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 06A051ABD for ; Thu, 21 Dec 2023 00:19:38 -0500 (EST) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d3aa0321b5so3887605ad.2 for ; Wed, 20 Dec 2023 21:19:37 -0800 (PST) Received: from localhost.localdomain ([171.216.79.133]) by smtp.gmail.com with ESMTPSA id e12-20020a170902b78c00b001bb750189desm622742pls.255.2023.12.20.21.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 21:19:35 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,TVD_SPACE_RATIO,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703135976; x=1703740776; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=phXC9DqlmZtJ9nljpSf6V2ja+QMza5OpjYdqftF5Hr0=; b=xUB/HazjyB/Y2m2HIzVJsa+l1/l+hy6ELWHiqyOZdanlNlCBRMqRLEWiuS9HlsY8Te Z0CIu6iNNrP2ZL0ma7KfNgjE0XJ7PHAsdPMqYv/7yYFE85X8lZnf6c3IQ5ISJF0yMyrV MLRKh9Gv/oQ5WS6lhTE45DgNW0+6h0QmBBU0VQNDFyxRk2DB78ee9P7NG60x4svTj/rU QoDa7dKUu5FHHTxTN8aYFlzS9x4krqe6rTqpFFkTvpy3x+rgrYYHtfb+HMzyZ+NHsx+8 csPY/MABzNL7nLndSIuKXn37ojOwNunRFhThXc1mtSniQ1o0T0t0yheuRCHjevWbZ/DB p/Bg== X-Gm-Message-State: AOJu0YzhnMO2u8LjPrjM4hWT02FckU4Ga8cm4P7nsBbif6FPk7JcNdmw 4u4WG3UzQN7a8tiaguAbGYWAv++xvO4/A2LxUNBp9DX9 X-Google-Smtp-Source: AGHT+IGwQY4/OFmOwsu5ONakwZnDSw8Wy8B/wt4bL+IHczdlzQvU0R45oj6nkZjVBApBmwyKFxz6tw== X-Received: by 2002:a17:902:6805:b0:1d3:f285:5820 with SMTP id h5-20020a170902680500b001d3f2855820mr1784959plk.104.1703135976205; Wed, 20 Dec 2023 21:19:36 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v3 2/4] qemu_migration: Implement VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 21 Dec 2023 13:19:22 +0800 Message-Id: <637febb5b63b6956386b2ddb674094a0d343829c.1703135535.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 257X3KWTVFRSYY3HQ2R5UP2VYCSE2AJF X-Message-ID-Hash: 257X3KWTVFRSYY3HQ2R5UP2VYCSE2AJF X-MailFrom: yong.huang@smartx.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: yong.huang@smartx.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1703136228639100001 Signed-off-by: Hyman Huang Message-Id: <1f76c7f2fdbc2396290bcd1ad5f5b52b89fba926.1702094858.git.yong.h= uang@smartx.com> --- src/qemu/qemu_migration.c | 8 ++++++++ src/qemu/qemu_migration.h | 1 + src/qemu/qemu_migration_params.c | 6 ++++++ src/qemu/qemu_migration_params.h | 1 + 4 files changed, 16 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 3ba0aa502b..747960b030 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2592,6 +2592,14 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, if (!qemuMigrationSrcIsAllowed(vm, true, vm->job->asyncJob, flags)) return NULL; =20 + if (flags & VIR_MIGRATE_DIRTY_LIMIT && + (!(vm->def->features[VIR_DOMAIN_FEATURE_KVM] =3D=3D VIR_TRISTATE_S= WITCH_ON && + vm->def->kvm_features->features[VIR_DOMAIN_KVM_DIRTY_RING] =3D= =3D VIR_TRISTATE_SWITCH_ON))) { + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("dirtylimit migration requires dirty-ring feature= s enabled")); + return NULL; + } + if (!(flags & (VIR_MIGRATE_UNSAFE | VIR_MIGRATE_OFFLINE)) && !qemuMigrationSrcIsSafe(vm->def, priv->qemuCaps, nmigrate_disks, migrate_disks, flags)) diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h index ed62fd4a91..a2a598fe28 100644 --- a/src/qemu/qemu_migration.h +++ b/src/qemu/qemu_migration.h @@ -62,6 +62,7 @@ VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES | \ VIR_MIGRATE_POSTCOPY_RESUME | \ VIR_MIGRATE_ZEROCOPY | \ + VIR_MIGRATE_DIRTY_LIMIT | \ 0) =20 /* All supported migration parameters and their types. */ diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index 79fe6e97c8..797293d8e7 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -99,6 +99,7 @@ VIR_ENUM_IMPL(qemuMigrationCapability, "dirty-bitmaps", "return-path", "zero-copy-send", + "dirty-limit", ); =20 =20 @@ -194,6 +195,11 @@ static const qemuMigrationParamsFlagMapItem qemuMigrat= ionParamsFlagMap[] =3D { VIR_MIGRATE_ZEROCOPY, QEMU_MIGRATION_CAP_ZERO_COPY_SEND, QEMU_MIGRATION_SOURCE}, + + {QEMU_MIGRATION_FLAG_REQUIRED, + VIR_MIGRATE_DIRTY_LIMIT, + QEMU_MIGRATION_CAP_DIRTY_LIMIT, + QEMU_MIGRATION_SOURCE}, }; =20 /* Translation from VIR_MIGRATE_PARAM_* typed parameters to diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_par= ams.h index 5857673227..44a44aae07 100644 --- a/src/qemu/qemu_migration_params.h +++ b/src/qemu/qemu_migration_params.h @@ -40,6 +40,7 @@ typedef enum { QEMU_MIGRATION_CAP_BLOCK_DIRTY_BITMAPS, QEMU_MIGRATION_CAP_RETURN_PATH, QEMU_MIGRATION_CAP_ZERO_COPY_SEND, + QEMU_MIGRATION_CAP_DIRTY_LIMIT, =20 QEMU_MIGRATION_CAP_LAST } qemuMigrationCapability; --=20 2.39.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org From nobody Sun May 12 18:05:34 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17031363141089.761015964442436; Wed, 20 Dec 2023 21:25:14 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 1B4101BAB; Thu, 21 Dec 2023 00:25:13 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E07BD1BC2; Thu, 21 Dec 2023 00:20:03 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 06C931ABC; Thu, 21 Dec 2023 00:19:41 -0500 (EST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 29AAB1ABD for ; Thu, 21 Dec 2023 00:19:40 -0500 (EST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1d3ea5cc137so3703555ad.0 for ; Wed, 20 Dec 2023 21:19:40 -0800 (PST) Received: from localhost.localdomain ([171.216.79.133]) by smtp.gmail.com with ESMTPSA id e12-20020a170902b78c00b001bb750189desm622742pls.255.2023.12.20.21.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 21:19:38 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703135979; x=1703740779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EAZx2bxgAYVFJKb7fZmfUeWOBg0Qhxi5yoL9Dxjp7MA=; b=Wx+0buMT3/b3mY/zc0rPhyObP9BYadFn/+guJp4g19RwVksEyhdB464avao0xStl5O y8BZU+VbLQDKEGwymmGAxScrY/+S8238sWGmQFk+OZyrvTasDEKqHdf4126QDY7YIh0s qI3x0tO8nOYgwpBBFP79Ex4BfC54KGkgt2huotb+M0OjDUwOve02v1s0QLP7cLATDs0T TaYaBkwCkrZc34I6bXyq2EOxri3W7m3TabbwVDZrRNaSBmzJL4pCjcFCujBfCgTlL+UG BFYHT3485cb6xZsJeO+lWKu9iPD5md5Z9+0GbYBG70bIfa7uVzLucYjVg0xjNjFI5dgs E0Yg== X-Gm-Message-State: AOJu0YzlhSZt5ONfjEenQBpvaDcfjflZjTe7hQUUl3iexxdP1QZdyJfP BSnabt/oTsTIkhGtgyHqSnVAGqwdYGIdz1eVCH4yvRPT X-Google-Smtp-Source: AGHT+IFNNnk/j44wqUFGOVVbn5QNv5ARcQegIYKUJ/r1tl4jtoeRz/80VB+kddIy1yHRa9wpv57xvQ== X-Received: by 2002:a17:902:d510:b0:1d3:b651:5e8 with SMTP id b16-20020a170902d51000b001d3b65105e8mr7842841plg.96.1703135978417; Wed, 20 Dec 2023 21:19:38 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v3 3/4] virsh: Add support for VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 21 Dec 2023 13:19:23 +0800 Message-Id: <4031d106929c757cec41fdc1b5e1941c123fb0c6.1703135535.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: P34XYLKHA7F6QKWSYILSYHP3NAU7X7VH X-Message-ID-Hash: P34XYLKHA7F6QKWSYILSYHP3NAU7X7VH X-MailFrom: yong.huang@smartx.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: yong.huang@smartx.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1703136314956100001 Introudce option to enable dirty-limit convergence algorithim during live migration. Signed-off-by: Hyman Huang Message-Id: <697630e5e66de5c4e2980f49b4240854ddf58673.1702094858.git.yong.h= uang@smartx.com> --- docs/manpages/virsh.rst | 10 +++++++++- src/libvirt-domain.c | 8 ++++++++ tools/virsh-domain.c | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index ed1027e133..c160fb4c3b 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3380,7 +3380,7 @@ migrate [--compressed] [--comp-methods method-list] [--comp-mt-level] [--comp-mt-threads] [--comp-mt-dthreads] [--comp-xbzrle-cache] [--comp-zlib-level] [--comp-zstd-level] - [--auto-converge] [auto-converge-initial] + [--dirty-limit] [--auto-converge] [auto-converge-initial] [auto-converge-increment] [--persistent-xml file] [--tls] [--postcopy-bandwidth bandwidth] [--parallel [--parallel-connections connections]] @@ -3436,6 +3436,14 @@ source or destination host and the ``migrate`` comma= nd will report an error leaving the domain active on both hosts. To recover from such situation re= peat the original ``migrate`` command with an additional *--postcopy-resume* fl= ag. =20 +*--dirty-limit* forces convergence using dirty-limit algorithms during live +migration. For QEMU/KVM, this means migration will throttle vCPUs as neede= d to +keep their dirty page rate within the migration parameter ``vcpu-dirty-lim= it`` +(1 megabits/s by default). This can improve the responsiveness of large gu= ests +during live migration and result in more stable read performance. It requi= res +dirty-ring size configuration and conflicts with the traditional +``auto-converge`` algorithm. + *--auto-converge* forces convergence during live migration. The initial guest CPU throttling rate can be set with *auto-converge-initial*. If the initial throttling rate is not enough to ensure convergence, the rate is diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 94e5672ed8..4254d1e3f2 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -4227,6 +4227,10 @@ virDomainMigrate3(virDomainPtr domain, /* Now checkout the destination */ virCheckReadOnlyGoto(dconn->flags, error); =20 + VIR_EXCLUSIVE_FLAGS_GOTO(VIR_MIGRATE_AUTO_CONVERGE, + VIR_MIGRATE_DIRTY_LIMIT, + error); + VIR_EXCLUSIVE_FLAGS_GOTO(VIR_MIGRATE_NON_SHARED_DISK, VIR_MIGRATE_NON_SHARED_INC, error); @@ -4652,6 +4656,10 @@ virDomainMigrateToURI3(virDomainPtr domain, virCheckDomainReturn(domain, -1); virCheckReadOnlyGoto(domain->conn->flags, error); =20 + VIR_EXCLUSIVE_FLAGS_GOTO(VIR_MIGRATE_AUTO_CONVERGE, + VIR_MIGRATE_DIRTY_LIMIT, + error); + VIR_EXCLUSIVE_FLAGS_GOTO(VIR_MIGRATE_TUNNELLED, VIR_MIGRATE_PARALLEL, error); diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 58d5a4ab57..aa6f96a999 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10990,6 +10990,10 @@ static const vshCmdOptDef opts_migrate[] =3D { .type =3D VSH_OT_BOOL, .help =3D N_("compress repeated pages during live migration") }, + {.name =3D "dirty-limit", + .type =3D VSH_OT_BOOL, + .help =3D N_("force convergence with dirty-limit algorithim during li= ve migration") + }, {.name =3D "auto-converge", .type =3D VSH_OT_BOOL, .help =3D N_("force convergence during live migration") @@ -11176,6 +11180,7 @@ doMigrate(void *opaque) { "change-protection", VIR_MIGRATE_CHANGE_PROTECTION }, { "unsafe", VIR_MIGRATE_UNSAFE }, { "compressed", VIR_MIGRATE_COMPRESSED }, + { "dirty-limit", VIR_MIGRATE_DIRTY_LIMIT }, { "auto-converge", VIR_MIGRATE_AUTO_CONVERGE }, { "rdma-pin-all", VIR_MIGRATE_RDMA_PIN_ALL }, { "offline", VIR_MIGRATE_OFFLINE }, @@ -11528,6 +11533,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd) VSH_EXCLUSIVE_OPTIONS("live", "offline"); VSH_EXCLUSIVE_OPTIONS("timeout-suspend", "timeout-postcopy"); VSH_EXCLUSIVE_OPTIONS("copy-storage-all", "copy-storage-inc"); + VSH_EXCLUSIVE_OPTIONS("dirty-limit", "auto-converge"); VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy"); VSH_REQUIRE_OPTION("postcopy-resume", "postcopy"); VSH_REQUIRE_OPTION("timeout-postcopy", "postcopy"); --=20 2.39.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org From nobody Sun May 12 18:05:34 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1703136373463349.613143035034; Wed, 20 Dec 2023 21:26:13 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 635361BF2; Thu, 21 Dec 2023 00:26:12 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 1898F1BF0; Thu, 21 Dec 2023 00:20:16 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 1AD9B1AC4; Thu, 21 Dec 2023 00:19:43 -0500 (EST) Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 690F91ABC for ; Thu, 21 Dec 2023 00:19:42 -0500 (EST) Received: by mail-il1-f173.google.com with SMTP id e9e14a558f8ab-35fd5988c34so757005ab.3 for ; Wed, 20 Dec 2023 21:19:42 -0800 (PST) Received: from localhost.localdomain ([171.216.79.133]) by smtp.gmail.com with ESMTPSA id e12-20020a170902b78c00b001bb750189desm622742pls.255.2023.12.20.21.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 21:19:40 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703135981; x=1703740781; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EcuF5qi+TZrgAGIbNZDTuDw16LLskIzBwNFJyMxVWl8=; b=p5pBhmxM7vrPLHpwc2aa8gHsUOZugAHHwLG4diDVHqWnglQ3DezxqG48bMJMUjDSal GCcwM5X/R6XLQH7086k2B1Wkg5IVGeE9qxD+/e/CWSCfwPnZdMOD3iZqnDImiisjZk2t gXT9U8GFKQqZI+aO2t+TpzDcrNsIrU5A0r+D3iMgBexige8vAm2IjPu6AP6XaNyHSqaw P8ZUqw0zE1545XyhbzeuEoV4O8s80ZNjjSyjhkIEGPPIiTo+2px7E1s1FH6V7FOgqqqb WykNKFRFQxHEq6TPh2RY8srz8wpizFeqqznbZErQndMzKYorTNdzxf6oiiPUXuI7dk/h xW8A== X-Gm-Message-State: AOJu0YxhWvJidLVFnpiNu+S95YOXUw8cyrpF5BE9QloD2EHdSl0olN+R AjPCAPSHILwLPG6MuDc+RqoxOQcX+rEyYNq+zT3H8lNt X-Google-Smtp-Source: AGHT+IEgzMLCYJthnPK51mqKRMZ1h/0KgnXBYatzWYFLZXUHVDH3i2njLYT41wTcHe9gMkeX+s4J+Q== X-Received: by 2002:a05:6e02:17cf:b0:35d:53e9:c15c with SMTP id z15-20020a056e0217cf00b0035d53e9c15cmr29035259ilu.18.1703135980692; Wed, 20 Dec 2023 21:19:40 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v3 4/4] NEWS: document support for dirty-limit live migration Date: Thu, 21 Dec 2023 13:19:24 +0800 Message-Id: <9103308a72e5ec6db5b2d14ebda3b018cf7b9f20.1703135535.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 6WSVCANK2GZXEOF2ZASBKYFS52JAUJPH X-Message-ID-Hash: 6WSVCANK2GZXEOF2ZASBKYFS52JAUJPH X-MailFrom: yong.huang@smartx.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: yong.huang@smartx.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1703136375344100001 Signed-off-by: Hyman Huang Message-Id: --- NEWS.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index dc40602c72..4d1ff489b0 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,14 @@ v10.0.0 (unreleased) =20 * **New features** =20 + * QEMU: Support dirty-limit live migration + + Introduce ``VIR_MIGRATE_DIRTY_LIMIT`` flag for live migration API, + which can enable the dirty-limit convergence algorithm during live + migration and reap more stable read performance for guest vCPUs. + + Also, add the corresponding ``--dirty-limit`` option to ``virsh migrat= e``. + * **Improvements** =20 * **Bug fixes** --=20 2.39.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org