From nobody Sun May 12 01:41:01 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 1699758484113692.6034415007911; Sat, 11 Nov 2023 19:08:04 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 080B11AC3; Sat, 11 Nov 2023 22:08:03 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 7BA221AFB; Sat, 11 Nov 2023 22:05:38 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id A5C1E1A56; Sat, 11 Nov 2023 22:05:24 -0500 (EST) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (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 8F5AC1966 for ; Sat, 11 Nov 2023 22:05:23 -0500 (EST) Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-6ce2c5b2154so2031473a34.3 for ; Sat, 11 Nov 2023 19:05:23 -0800 (PST) Received: from localhost.localdomain ([125.69.8.82]) by smtp.gmail.com with ESMTPSA id w12-20020a17090a4f4c00b0026801e06ac1sm1830938pjl.30.2023.11.11.19.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Nov 2023 19:05:21 -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=1699758322; x=1700363122; 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=wbV4xrdh8Ztvm3t/cSUlgIZ/yhBy/iDnfP6u8K2LXsWJV+/zjoGDGEWZg9lozPeKcK H0Bz3oNg+ofDF3SfqgrvTCaQsSa+oj+A/08J4jktoQYdAQ+vK5z0pE5maxiSppnm2Ghr kCFYgPuB6x8EoSgpWvEcf1VLbgu8L6qWRFCHMIQ+o3TFmfe2QaUGXGiX9WlTyCv4uKz/ RZRKZ8hhuSylPyiJP+iSZrN8T3QNTRFF/dCBRTfLlkEOikQEBMGtPt3OQzQGZDLMPAJp Hqo+c1Co3Pe3RaC/VuSNE8GNvAyiCgNtFYqQ/S9fZ8uiygElX0SS5/GiHqvzw63hpa15 UHUQ== X-Gm-Message-State: AOJu0YxK7bKwqJ3qmejEmTVOgT0mmLVwHNshzzHtjBbYxyZIQycC/n/B SIUS4F6Bn1l2zu0TK6ior4HnG5TNCKWty7PfCpo= X-Google-Smtp-Source: AGHT+IFHuMbfKeiASktpyO4/M9jVpf7+7pAeVQyUUw9Mj6P7BKUIzfnjWrcJXPIzLH36Ud9Fqgeqpw== X-Received: by 2002:a05:6870:2382:b0:1eb:e8b:7206 with SMTP id e2-20020a056870238200b001eb0e8b7206mr5398919oap.14.1699758321786; Sat, 11 Nov 2023 19:05:21 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v2 1/4] Add VIR_MIGRATE_DIRTY_LIMIT flag Date: Sun, 12 Nov 2023 11:05:09 +0800 Message-Id: <53f148cc0d51a4658d8d6d2de3c2b3944d880d3f.1699756433.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: JASW4VLQWHEDFJK655D2GUT7EJQVUDWG X-Message-ID-Hash: JASW4VLQWHEDFJK655D2GUT7EJQVUDWG 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: 1699758485843100001 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 Sun May 12 01:41:01 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 1699758594242978.8460409483869; Sat, 11 Nov 2023 19:09:54 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id D38CE1B11; Sat, 11 Nov 2023 22:09:52 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C25F31B24; Sat, 11 Nov 2023 22:05:45 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 8BED01A61; Sat, 11 Nov 2023 22:05:28 -0500 (EST) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (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 815471A53 for ; Sat, 11 Nov 2023 22:05:26 -0500 (EST) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-1ef370c2e12so1995313fac.1 for ; Sat, 11 Nov 2023 19:05:26 -0800 (PST) Received: from localhost.localdomain ([125.69.8.82]) by smtp.gmail.com with ESMTPSA id w12-20020a17090a4f4c00b0026801e06ac1sm1830938pjl.30.2023.11.11.19.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Nov 2023 19:05:24 -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=1699758325; x=1700363125; 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=fjoP31dz2NxFlTUg7R/+NAurl2WnSQQob1/QQvd+H6s=; b=Aqfgf+ku3I1CQidZnyzjVvFtIWmUWLugbzBqitLXQZBEBDYRaxDOrgwRL4S8azD82a 1tOBkh9t3+ojXDQs7sLUh/3ybWOL3TsEO/rmMe+uGUrXX0nSlHv9gcsmNLdOY03RCuQb r+Gu/FnsvI4YOSxUmLljWAmBxJ7kYHGATL4EA5JQQhqmboQPDGAiCG2IL9uRRy++CMn0 gDZSinmjBefzszly2UzErufv22MeWR7BXzRsm18XeSZ3P9rgjkQiFEDV1SnP1jYwyPFw r5sQxaQCC9EGNIdEF7RfNU70FYzQS0LjdC2x8SNvi6JLJBocwMCumOJ7suYQJit6kzgn NNJg== X-Gm-Message-State: AOJu0YzXjt1mp+urBRBXhzuDhQzuBulsX6NEB5epcJe+wk5QtoDqe8pd MPcxrkDnEZVsAVws5AjUHGnH4t1doFcD2HfZFh4= X-Google-Smtp-Source: AGHT+IEzNhsdN86AMNoA+9C6WZwOBLyURKw+vr6h0A3fXBesC+tJgW9ADo8QiACVXLbAal1m0L5g4Q== X-Received: by 2002:a05:6870:5309:b0:1e9:de31:8000 with SMTP id j9-20020a056870530900b001e9de318000mr5185337oan.9.1699758324967; Sat, 11 Nov 2023 19:05:24 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v2 2/4] qemu_migration: Implement VIR_MIGRATE_DIRTY_LIMIT flag Date: Sun, 12 Nov 2023 11:05:10 +0800 Message-Id: <67c59aee39a0609ca0b265fa3f94ab4774f390a7.1699756433.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: CHY2Q4OWTKLY6HI62VMMWUU7Q4636WJ5 X-Message-ID-Hash: CHY2Q4OWTKLY6HI62VMMWUU7Q4636WJ5 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: 1699758596060100001 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 ac58aa1a8c..430a58a93d 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2558,6 +2558,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 01:41:01 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 1699758739633787.9318368470518; Sat, 11 Nov 2023 19:12:19 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 879701A58; Sat, 11 Nov 2023 22:12:18 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 09EAE1B04; Sat, 11 Nov 2023 22:06:22 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 7F8AF1AB8; Sat, 11 Nov 2023 22:05:57 -0500 (EST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (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 0BF5C1A95 for ; Sat, 11 Nov 2023 22:05:30 -0500 (EST) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso2521009a12.3 for ; Sat, 11 Nov 2023 19:05:29 -0800 (PST) Received: from localhost.localdomain ([125.69.8.82]) by smtp.gmail.com with ESMTPSA id w12-20020a17090a4f4c00b0026801e06ac1sm1830938pjl.30.2023.11.11.19.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Nov 2023 19:05:27 -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=1699758328; x=1700363128; 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=OckIC1bdp2gRunsCQ/jobz4gA8WRykTTws7Yy7rzE1Y=; b=MWA4Z6vrRiFLRBCnvI6Sz3AouAQLR/+i5CGVT9z44cBghLAwQDyJGbUHdBcbs2Zq+z ziyPNSjWjX+fEeK/TgiBv0Iiv85IOwfffOk4B3Jcz3+2AU1reVuqjViXpqD9Jfl2zU1+ DXPdNzjWoYy3uzkoAI8Yic9MyVh5wg70DO1vFpte26WnxESVn0+nIHGM+enE6hyx9wBA fdxZXFXozaxLSmITn79L3+HZvn+oPmf8C3QEI15mwnp4X4xcOgM+AdO5TtpZbW9TdNYe HLD9G7pxuN3xTTeed5F0dlfgdAvaeFMGGcWI5RqJPCP0zWsc/glew+YoMPeyV4Eykwmj uWwA== X-Gm-Message-State: AOJu0YwVAZeZB4Qc/n/CowUD2rCyG5OBXfglSOow0C4HN1WuQDIFMh3z Tv5gBApQS6M/sr34s5/twvzYG41HELiu5R3eM3U= X-Google-Smtp-Source: AGHT+IGzu7a1agPMtlJAhNYdorT7pBHEsAEFX29vB0VupQVgAnGWjwzcpdgjgKIEMunTTK9W6dvmqw== X-Received: by 2002:a05:6a21:a59f:b0:186:2257:6228 with SMTP id gd31-20020a056a21a59f00b0018622576228mr3377337pzc.19.1699758328185; Sat, 11 Nov 2023 19:05:28 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v2 3/4] virsh: Add support for VIR_MIGRATE_DIRTY_LIMIT flag Date: Sun, 12 Nov 2023 11:05:11 +0800 Message-Id: <1bc5486f46c946bf5027053a2578026e4b0a8f97.1699756433.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: IMR5NLNPXXQP3AKQCQP4PIV7QBCEQZ5Q X-Message-ID-Hash: IMR5NLNPXXQP3AKQCQP4PIV7QBCEQZ5Q 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: 1699758740420100001 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 58e1e5ea8d..e5b9679644 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -4213,6 +4213,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); @@ -4633,6 +4637,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 Sun May 12 01:41:01 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 169975865749992.04084008542975; Sat, 11 Nov 2023 19:10:57 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 797FF1772; Sat, 11 Nov 2023 22:10:56 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2CB5F1AFF; Sat, 11 Nov 2023 22:06:14 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id A29371B2F; Sat, 11 Nov 2023 22:05:56 -0500 (EST) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (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 4B85D1AB8 for ; Sat, 11 Nov 2023 22:05:32 -0500 (EST) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2802d218242so3137708a91.1 for ; Sat, 11 Nov 2023 19:05:32 -0800 (PST) Received: from localhost.localdomain ([125.69.8.82]) by smtp.gmail.com with ESMTPSA id w12-20020a17090a4f4c00b0026801e06ac1sm1830938pjl.30.2023.11.11.19.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Nov 2023 19:05:30 -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=1699758331; x=1700363131; 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=OZgoM9JsYbcV3DIUG4wUsGJRV23EHSivZ9oXjxLS8Fk=; b=Hti84nO/fcREcxY9793bPa1MN/z/kouLTz5gkkU2m02z8iz8auVUpKxCvEs3h23ld7 jZjxk4X/sYiq3xk7B6rNwydoF/+n3L6nIlOMFSTGVqn6QppfM0CYr4C0ksy3FlR4j+1f ZpL/UMyPPca6TlOMAU2/3WXw7T6CbY6QksBubBWIeux9Eh/jCoh5DNKMq/Go4HJehYo9 v7RFW1OrcxZ+U7+Lw1SD5LRnyl0EbSr1ycu2FM4Yu1B+EMH8JB6rTswEj+95MnB33O7D hyl31nMg6WhnFt0wmdq+8qbcwAxx6AKmzme82xU+qZwpRqxF5GDqGD+zoADbOwdhn3H6 yK3A== X-Gm-Message-State: AOJu0YwyGSEMZN5ptgU0S0rnEIhanpyv26EutBLLX/OZ7veek9kgqW+K WJLVuEEd45x8U2yi65jxLRe+covsDiuM+V22wo0= X-Google-Smtp-Source: AGHT+IHxGnAZxiI7boyzM+NrIJmBuzF8s5/4vb75DrLn15qjQ2gZcCdzFwGGVpu6whlzmlS9fMy37Q== X-Received: by 2002:a17:90b:38c1:b0:280:5e66:a1e2 with SMTP id nn1-20020a17090b38c100b002805e66a1e2mr3724830pjb.22.1699758330558; Sat, 11 Nov 2023 19:05:30 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [v2 4/4] NEWS: document support for dirty-limit live migration Date: Sun, 12 Nov 2023 11:05:12 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 5RJT7TP3MNVX6ZA65VIRDWPXZ3A5JHWQ X-Message-ID-Hash: 5RJT7TP3MNVX6ZA65VIRDWPXZ3A5JHWQ 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: 1699758658178100001 Signed-off-by: Hyman Huang --- NEWS.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 08e5a3d04a..655666e64b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -35,6 +35,14 @@ v9.9.0 (2023-11-01) guest features to see if the current libvirt supports both deleting and reverting external snapshots. =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``. + * virsh: add ``console --resume`` support =20 The ``virsh console`` subcommand now accepts a ``--resume`` option. Th= is --=20 2.39.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org