From nobody Thu May 16 12:06:33 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 1701303846182771.6111992014478; Wed, 29 Nov 2023 16:24:06 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9810A1AE9; Wed, 29 Nov 2023 19:24:05 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 7EE9A1B36; Wed, 29 Nov 2023 19:21:52 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 8F46C1A4D; Wed, 29 Nov 2023 19:21:39 -0500 (EST) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 97F021A43 for ; Wed, 29 Nov 2023 19:21:37 -0500 (EST) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1cfbda041f3so3926815ad.2 for ; Wed, 29 Nov 2023 16:21:37 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id b21-20020a170902d31500b001bc930d4517sm12801758plc.42.2023.11.29.16.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:21: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,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=1701303696; x=1701908496; 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=b1ZK87CeSM4dgZYrPUH0roQzc0StWajLN4pwG6H6NhQ=; b=MIvKTtFIOJyB5nCDQa/AudztYv2PtEFNDCsAxD5jbfHNlNdtcZZDGNw/wG6B8Xp/Lf mpqND1CSveEcQsZ12Eeb05fwHdtesmFflAURZmp+ykHHHxocieaaD/mOecOqsTCgafMF jkcBxeiEDpt4s/eUZn+NWk/DLNa5vTchVxGWBzCwCaU4dlt2DKVNH3+jIfrZ80Iuzn6w GmRkXk839ElA3NU9eh7VnnBbBufPkzlwEyvxL4HCfHpkKmrcf7r0eCPMVTHEqHT2mdxy NiilFlJsBgmmEod7lmKmFRaEBkzOFND8+H9HLqkK9NbXW1nDDRuvJWaCw2KHnCeN7XU6 mY3g== X-Gm-Message-State: AOJu0YweJvDVKVj0sijEGaNkHw0NufaBJgRS+vm18LrqenzmxZ0ECdgL Ykxr4yeWc1NUUFuQJ99V6sTEFyLFsItF08xG1D20RqLO X-Google-Smtp-Source: AGHT+IFyM6adjjGtdBe4etBJ16HAo5IC5yQ42f+FFp6CGKS+kXCeloUkc1IgiAdjd9E0KM0NOO1ZFg== X-Received: by 2002:a17:902:e546:b0:1cf:ff41:51e2 with SMTP id n6-20020a170902e54600b001cfff4151e2mr7958989plf.55.1701303695980; Wed, 29 Nov 2023 16:21:35 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH 1/4] Add VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 30 Nov 2023 08:21:21 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: AN6ZPMYU463SLWKXLSLKKFIBMDZI7DXN X-Message-ID-Hash: AN6ZPMYU463SLWKXLSLKKFIBMDZI7DXN 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: Hyman Huang 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: 1701303847714000001 The flag can be used to enable dirty-limit capability for live migration. Signed-off-by: Hyman Huang --- 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 a1902546bb..4a4209c01a 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: 9.9.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 Thu May 16 12:06:33 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 1701303918961396.12859930627167; Wed, 29 Nov 2023 16:25:18 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 63D1A1A99; Wed, 29 Nov 2023 19:25:18 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 7C1581ABD; Wed, 29 Nov 2023 19:22:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 0732A1A41; Wed, 29 Nov 2023 19:21:40 -0500 (EST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 30B8D19AA for ; Wed, 29 Nov 2023 19:21:39 -0500 (EST) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-285b926e5deso457578a91.0 for ; Wed, 29 Nov 2023 16:21:39 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id b21-20020a170902d31500b001bc930d4517sm12801758plc.42.2023.11.29.16.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:21:36 -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=1701303698; x=1701908498; 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=90Q1Lsnxc9LxqJaXIh3b4cdI9ZMaANcPWJcwE9JyXyg=; b=ftuR+1SkVoEhbU6z9/4U6yA61Y/tfY0ak5Nxl/yR8n725SlHdXr7/QAFAAvLHO49mq SdONT8AlRFpQMOF1FtJw0hMCaJENlZ9JklGz9tOYyYmzqsvlxp52qo6IsG4G7ZHIGv1b rb+qQze1bS5PqYKdKKrQMMwphD/H7zMGVRTNqZMKdHjGnrxO3Wfw6LMnygfkqRP/JMV8 jAWHPZuo6WLq5aO9uOfkbL7Mxei6Wb3jbOEIcsDfRZY+wvSQWm5/+INFjOOhWyOeVGxF K+WJLCj+sG2fUK5w89eVySbHEzSz1JoMf+NeJrIZlQIOIXYSJWl7MDIqXW/UShAIRDtg F/QA== X-Gm-Message-State: AOJu0YzBQmw3T5moimGYBwMCwTmNKN7nf0a/zmLAvMEwBh2FmemevyX3 g6YGvfS7H19VsKNSMZW600/8AxTBx8Qsk748vGU5qSsA X-Google-Smtp-Source: AGHT+IF1GYPHWw7PtQU43vOVpqrIHjdQ3/3ZoerJuVCmLMiQEwHpY63EqYdkhK6/764Z4swrsJgx9g== X-Received: by 2002:a17:90b:4c02:b0:285:dbbe:1178 with SMTP id na2-20020a17090b4c0200b00285dbbe1178mr10577031pjb.39.1701303697440; Wed, 29 Nov 2023 16:21:37 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH 2/4] qemu_migration: Implement VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 30 Nov 2023 08:21:22 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: V44JIT6FX6JDAXJGX5GNTUFMAL5DB6I5 X-Message-ID-Hash: V44JIT6FX6JDAXJGX5GNTUFMAL5DB6I5 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: Hyman Huang 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: 1701303919919000001 Signed-off-by: Hyman Huang --- 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 f9c34b72e8..ec653181ff 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2571,6 +2571,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 Thu May 16 12:06:33 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 1701304010119226.37980135322653; Wed, 29 Nov 2023 16:26:50 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 7CEAA1B8A; Wed, 29 Nov 2023 19:26:49 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8CE9E1AF3; Wed, 29 Nov 2023 19:22:09 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 985981A40; Wed, 29 Nov 2023 19:21:41 -0500 (EST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 BC17D19AA for ; Wed, 29 Nov 2023 19:21:40 -0500 (EST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1cfb30ce241so4127315ad.0 for ; Wed, 29 Nov 2023 16:21:40 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id b21-20020a170902d31500b001bc930d4517sm12801758plc.42.2023.11.29.16.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:21: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=1701303699; x=1701908499; 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=aLu9H/I4md/6laoSE6/bHnihb2aTujuXtpgQBgT0WRo=; b=Co4TommeHRWO5qHyZtUFr5+eXl3kH8uQeCI3PIIV9rQUAbWkjLesYuU72syfJcxQDY zmoIpU09fDjzKSdP4mVM47UH9i5zuIbshxPhNIRs6DtaPsrsdVx68PbF41JNMGMHQEZb 0FiVEDMFVbvYPpszEItsaThxkORkiGjVMEqFs2KOVaqxFp46VYeR38lBXm8jlOXOTkNX Q7bzqj+OKH/s3PoB+EQDzHNzpU89uwuSBdCIwf336EIG8Gcf25J4fySE/Un21hte0cCS xVCyN51F6KCkqILGVabukwY8vzADLAhRE13o1djazQc9UxGoBtk4L4Le5KruPYz5WaL3 DsoQ== X-Gm-Message-State: AOJu0YxkgcFZ41i4bCPmNcBQzaVK/IQ0oZLtupImcePSeXMQ20s0d+Gy BdrErdBa9Y/uHQjLiS92I9SupTRdzXc/azK5Kzi64EgX X-Google-Smtp-Source: AGHT+IErbMKD4PntD7i7/wJxHK1rtwHfuVbFZ3L2Xgf1mXtQntH4O/zzClKJaoVM55p8XJaUyE+HQQ== X-Received: by 2002:a17:902:d303:b0:1cf:876e:aa41 with SMTP id b3-20020a170902d30300b001cf876eaa41mr22195650plc.30.1701303698949; Wed, 29 Nov 2023 16:21:38 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH 3/4] virsh: Add support for VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 30 Nov 2023 08:21:23 +0800 Message-Id: <515e18fa598df716ceb7f8cc55657c567618189c.1701303444.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: NNN7VCMX3ZWWFB22Y25RNOXF6BG75NFX X-Message-ID-Hash: NNN7VCMX3ZWWFB22Y25RNOXF6BG75NFX 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: Hyman Huang 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: 1701304012108000001 Introudce option to enable dirty-limit convergence algorithim during live migration. Signed-off-by: Hyman Huang --- docs/manpages/virsh.rst | 10 +++++++++- src/libvirt-domain.c | 8 ++++++++ tools/virsh-domain.c | 10 ++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 3e7a4c6c22..d1d20cb5ba 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3376,7 +3376,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]] @@ -3432,6 +3432,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 77a9682ecb..dde60ab05b 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 66f933dead..3f34230e6b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10981,6 +10981,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") @@ -11167,6 +11171,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 }, @@ -11193,6 +11198,11 @@ doMigrate(void *opaque) flags |=3D flagmap[i].migflag; } =20 + if (flags & VIR_MIGRATE_DIRTY_LIMIT && flags & VIR_MIGRATE_AUTO_CONVER= GE) { + vshError(ctl, "'--dirty-limit' conflicts with '--auto-converge'"); + goto out; + } + if (flags & VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES && !(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_DI= SK))) { vshError(ctl, "'--copy-storage-synchronous-writes' requires one of= '--copy-storage-all', '--copy-storage-inc'"); --=20 2.39.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org From nobody Thu May 16 12:06:33 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 1701304081035979.3040269758274; Wed, 29 Nov 2023 16:28:01 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 749021B35; Wed, 29 Nov 2023 19:28:00 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 551141A95; Wed, 29 Nov 2023 19:22:18 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id F136319AA; Wed, 29 Nov 2023 19:21:42 -0500 (EST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 1A0111A40 for ; Wed, 29 Nov 2023 19:21:42 -0500 (EST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1cff3a03dfaso3880975ad.3 for ; Wed, 29 Nov 2023 16:21:42 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id b21-20020a170902d31500b001bc930d4517sm12801758plc.42.2023.11.29.16.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:21:39 -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=1701303701; x=1701908501; 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=mnOOo/bztdY7eFyTVyfan3IgNXJFQu+13XqAGknWTi8=; b=iB48iXRB0cP6dts3x9SF5dKbgybQ2MQX2y0UAs9tNp65KqgHE49ngdSyfXqBjUV2rF XIWqcNZGmQcIzr1Qq0/7BqpFPd81kdXiBluVcaOdnaSuENSWDsrlyDMQuHZyaupYB37G lPOEEMhrAThI91yymvLYaRzmo7lfRNz8JtmyCpefPHt5Rw2z07cXthS1D1rMGyR3pea6 NEdcmg71rFD0w4GixIIMgSOazTd87AoanADOo1uVUewNDSSv1znO0YEaEveALUizGJAG ZsPeO8T8XgYHOwDhPooiarW4AO2KMTFQUbxmeQJKeHPYMZ8YnOYKrQ2+mrSBkhuR/u+H Rhvw== X-Gm-Message-State: AOJu0YzCPBoGjdWsKvAaV3bzppmiKXi6QXeZCa5suERX26MDQhnbL28Z PXGQ1wVnFkEVL9asFzCuEcvFt2jd2VV91AsRSZCTiDaP X-Google-Smtp-Source: AGHT+IHBXgOI9YiA8WrLRiJhyGf5ldJ0i6AI9Mmo3sKcvA6mqA5RkpS+d5xRxkXTat/NVdcvveK0JQ== X-Received: by 2002:a17:902:f7c3:b0:1cf:f66b:8e9b with SMTP id h3-20020a170902f7c300b001cff66b8e9bmr6433945plw.66.1701303700359; Wed, 29 Nov 2023 16:21:40 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH 4/4] NEWS: document support for dirty-limit live migration Date: Thu, 30 Nov 2023 08:21:24 +0800 Message-Id: <93c75050b24dfbbc22461ac8fe4e29b462bb4adb.1701303444.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: PROKNNSJJKK6CPWC322XL4AI5KAS5W5P X-Message-ID-Hash: PROKNNSJJKK6CPWC322XL4AI5KAS5W5P 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: Hyman Huang 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: 1701304082379000001 Signed-off-by: Hyman Huang --- NEWS.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index f12734c2a1..f44b350a68 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,14 @@ v9.10.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``. + * Introduce pipewire audio backend =20 The QEMU hypervisor driver now allows setting ``pipewire`` backend for --=20 2.39.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org