From nobody Sun May 19 04:35:00 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 1702095541805388.93610847191565; Fri, 8 Dec 2023 20:19:01 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 8BD1C1863; Fri, 8 Dec 2023 23:19:00 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B52161864; Fri, 8 Dec 2023 23:16:33 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6F42417D0; Fri, 8 Dec 2023 23:16:24 -0500 (EST) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.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 A914717D4 for ; Fri, 8 Dec 2023 23:16:21 -0500 (EST) Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3b9e2a014e8so1590362b6e.2 for ; Fri, 08 Dec 2023 20:16:21 -0800 (PST) Received: from localhost.localdomain ([125.69.8.58]) by smtp.gmail.com with ESMTPSA id c5-20020a170902d90500b001d049ef0c1fsm2472513plz.190.2023.12.08.20.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 20:16:19 -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=1702095380; x=1702700180; 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=h5HxGg+3scc2m7oZLgDV2pMhez8oarUKMUXuvW6k2KY=; b=f0kOulVLin2lcUNXlMTHb11BwhNe48cOYfMAXEi6paTZtJb65QEWwgppNeyvzGuEkO f/m15ONpAzD6tbcg83W2vnYUb3DnaRQLKOlM1r14fl+cur3rlRSqxXTXyj+45cWA3Mcy ztYkxzX2JBhvjpJlzsAfZNQYz4Q8jNgRWysP7tDQLnzuHp2N1Ao+KJxD4Yi/H2QQDmYZ I86guFgK9cNO4Ni09Xr0G/FCPEE88oK8Ye+wLtU0hyNydRu87oLo1uXIVn/nXYZxUxiM UsYJngTJfigEiSrRHaiZoGbZFr5n0M8M7H3lAVBytHzVrQErZKlAjzO907VlukdTdZHC A76Q== X-Gm-Message-State: AOJu0YwXhk/bVbmgzhjDqJVX0H9PReYQgT4Eh5ybiQyUNZRDhlL26f+U GazhzOBXhVs0VZ2Mkus5NmT3E/8ZekzZ53YGrNGPOzJW X-Google-Smtp-Source: AGHT+IEueriaLUudfwJFoYXlntoJ1LShDkni95h5ygy0FQNzalFslmHp6h58EdCkIflUkPqRqrPWuQ== X-Received: by 2002:a05:6808:30aa:b0:3b9:f1ea:5996 with SMTP id bl42-20020a05680830aa00b003b9f1ea5996mr1486357oib.55.1702095379644; Fri, 08 Dec 2023 20:16:19 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH v2 1/4] Add VIR_MIGRATE_DIRTY_LIMIT flag Date: Sat, 9 Dec 2023 12:16:08 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: H2HUOJIPCGREKGH77PENHGYU6XWGCE4M X-Message-ID-Hash: H2HUOJIPCGREKGH77PENHGYU6XWGCE4M 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: 1702095542847100001 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..44af09823c 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 19 04:35:00 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 170209563082711.036735334130867; Fri, 8 Dec 2023 20:20:30 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5EEEC191B; Fri, 8 Dec 2023 23:20:29 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 05FC018F3; Fri, 8 Dec 2023 23:16:45 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id BC06517D0; Fri, 8 Dec 2023 23:16:24 -0500 (EST) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) (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 4922317D5 for ; Fri, 8 Dec 2023 23:16:23 -0500 (EST) Received: by mail-il1-f171.google.com with SMTP id e9e14a558f8ab-3580b94ac2eso13770635ab.0 for ; Fri, 08 Dec 2023 20:16:23 -0800 (PST) Received: from localhost.localdomain ([125.69.8.58]) by smtp.gmail.com with ESMTPSA id c5-20020a170902d90500b001d049ef0c1fsm2472513plz.190.2023.12.08.20.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 20:16: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_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=1702095382; x=1702700182; 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=/K+4Oh5jTOsRqquSPfnOibmwYK4m3bcbaGK+7vpATO8=; b=PJMcKfVspwW6v0wTWrKLWyfqrzkG6Nd+zEgkJMpqD8ybslfdd2FQtcuvhvynEfCT7X g/nghnEKV/xCW7Ff1GR/cZ3NXNlswzgnr2d54EzMXA0SAyii8i+WQgkjuTa+bNnqthVT ALW8aY73Cdc/tNrBvyQi5BGIN2p1zz62zLh+ljgT2qHFldfPnk3piBFM3Up9tDqI1BFv lS9Bx1N56fAgYKQRCSCJGdqYX4G2ogi33s526L2KV+kPTbzag2zJIHvfVqdfw5MISmrU lytawsewimJLTn+9W6TPpNDoPLh4E0zzBWN5zyngu4yN0+rPs9iJrpx5M+f0ewL+/RYw QFGQ== X-Gm-Message-State: AOJu0Yw1wIvVUDKoyarZtZb2pYH4nd2P2C5qBSaTykSlTUnPEmBILjEr myJJ6MkvLTmyVISkn/yDtIJJcNxdL5zRtpxMLlWwYj/a X-Google-Smtp-Source: AGHT+IHgfRjB3hidRKCPM2gmHZYMr0S1Q9Y73RRfcINQ2qpkoMSjudPLdDsYjYek9WfLajVr8vtzNQ== X-Received: by 2002:a92:d84a:0:b0:35e:6b43:466a with SMTP id h10-20020a92d84a000000b0035e6b43466amr1254284ilq.115.1702095381720; Fri, 08 Dec 2023 20:16:21 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH v2 2/4] qemu_migration: Implement VIR_MIGRATE_DIRTY_LIMIT flag Date: Sat, 9 Dec 2023 12:16:09 +0800 Message-Id: <1f76c7f2fdbc2396290bcd1ad5f5b52b89fba926.1702094858.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 42QRCI2UUYOOAWRXFA2WPL6LROWQ33ZV X-Message-ID-Hash: 42QRCI2UUYOOAWRXFA2WPL6LROWQ33ZV 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: 1702095632849100001 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 a5488fd477..df3a4df0c1 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2570,6 +2570,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 19 04:35:00 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 1702095716418502.04115445440846; Fri, 8 Dec 2023 20:21:56 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5F82A1884; Fri, 8 Dec 2023 23:21:55 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 297E21903; Fri, 8 Dec 2023 23:16:54 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 4F4BB17D8; Fri, 8 Dec 2023 23:16:29 -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 A6400179B for ; Fri, 8 Dec 2023 23:16:25 -0500 (EST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1d05e4a94c3so24443035ad.1 for ; Fri, 08 Dec 2023 20:16:25 -0800 (PST) Received: from localhost.localdomain ([125.69.8.58]) by smtp.gmail.com with ESMTPSA id c5-20020a170902d90500b001d049ef0c1fsm2472513plz.190.2023.12.08.20.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 20:16:23 -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=1702095384; x=1702700184; 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=4dF/hZ19504CeRNvoT3fSUM02NBSDEokilc7GeNNvhc=; b=cDNll1tIdbdlS15F+BJoiHhvq7MElvWrM+W51YgFc+Cru1du7BMBkLYOBrMaGnkMG5 Y8gU4YNMR4RyOlIAcfksIrp25X37KMmfgccIyfcl8GoFLEqOYD7yZMakMNvNBj31uxhf dBJUeGztnmVUUVCVIJpZRAel1AkrXI9p4Rm74Gtnn1tpT5y5LE5dz1MvJI3zSVksZLMc 6frHr2jeLCX65d4X1/QhJxcxh8IUvcQB9cWjgW+wcz3c00qbx0uwPf9PwprGI6CxagxC DyIGskljgKgcbrZS1iqLlTy/ziq+6VLIpsdwOA3uZINjoLVA8Y3Joy2hE8gb/gZHHK49 M+Hw== X-Gm-Message-State: AOJu0Yw/lybe5B9d2o/VUNNsp3+guxNKX2GDAIOHJ2XCmD3NymIBFbj0 am10BmbO7rVESzfQXEl3Oq+sNE79duV7/wiydYAg5m5m X-Google-Smtp-Source: AGHT+IGF76LihKXurRrlhu4x5h+iju0iQTCH7APp2rSpmtEMuYmNC6Yzm9ZyJ7Q6T+XIc8HIqTpFrw== X-Received: by 2002:a17:903:22c7:b0:1d0:7965:f530 with SMTP id y7-20020a17090322c700b001d07965f530mr1060420plg.88.1702095383942; Fri, 08 Dec 2023 20:16:23 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH v2 3/4] virsh: Add support for VIR_MIGRATE_DIRTY_LIMIT flag Date: Sat, 9 Dec 2023 12:16:10 +0800 Message-Id: <697630e5e66de5c4e2980f49b4240854ddf58673.1702094858.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: GR2XAWGOW6PTK4KUCIWDBR67QHEJ2ZJJ X-Message-ID-Hash: GR2XAWGOW6PTK4KUCIWDBR67QHEJ2ZJJ 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: 1702095716652100001 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 fa9d356e15..a40a7a3b7f 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_IN= C))) { 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 19 04:35:00 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 1702095779020335.36058412103614; Fri, 8 Dec 2023 20:22:59 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id E65AF1751; Fri, 8 Dec 2023 23:22:57 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8CE181897; Fri, 8 Dec 2023 23:17:04 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id B557C17D2; Fri, 8 Dec 2023 23:16:29 -0500 (EST) Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (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 CB9DE17D4 for ; Fri, 8 Dec 2023 23:16:27 -0500 (EST) Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3b9f8c9307dso145287b6e.0 for ; Fri, 08 Dec 2023 20:16:27 -0800 (PST) Received: from localhost.localdomain ([125.69.8.58]) by smtp.gmail.com with ESMTPSA id c5-20020a170902d90500b001d049ef0c1fsm2472513plz.190.2023.12.08.20.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 20:16:25 -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=1702095386; x=1702700186; 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=LLDJlq30hCUc3dYzI9qv2aqHKVeW/YoZIi+FMC2rvhU=; b=aYhllsveNDrTjiIP2PhXUsbWw5Vu6EMGWidJ0TuWE60KjZ6mslQnqrlUBvDtqblaft EYLP2+5wlFImPZfOM7nEjEUfaLFqUV5c/0RjWz6vsiztwohHamkd7qUUMD4vH7akg5jQ HmmGU1Vzjbn+QO9u5BataCojVET6A6mMhBK6+rEzQpSAFolLgz8NrNC8yMrotl7bVaxl QxGOx/N+de1LFuJ1ZVjxEO0ElEdm7/6ftCyfc+KYm1Vyz0sc9R5SD+Ads4EI/+M7AqD6 I534BPDEC78beGfxI9Ei8hNbeLzonGcomiajXzl5b74sK7UP6YCahdOHo2KKgo38zyd1 rn+g== X-Gm-Message-State: AOJu0YxQpgt7do73LOPB0wNYJ9Gyp4cXa0pg0l+zBCsVh17sR2FDvUDE 0brTL6559CqJQxU312Wbxj6hidkZUfgjJUqF+2zj445H X-Google-Smtp-Source: AGHT+IH0vqBIoysCRTZXpwnOpE+T2RnkSzAKcuD/KyXSVvxNFNDt8hFBbKscpDzU1L/VOgrCHJXGaQ== X-Received: by 2002:a05:6808:3195:b0:3b9:f962:2b60 with SMTP id cd21-20020a056808319500b003b9f9622b60mr495379oib.112.1702095386135; Fri, 08 Dec 2023 20:16:26 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH v2 4/4] NEWS: document support for dirty-limit live migration Date: Sat, 9 Dec 2023 12:16:11 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: H4M2ET3O7A4FKYDQIBKCDZSHYGD3YQJZ X-Message-ID-Hash: H4M2ET3O7A4FKYDQIBKCDZSHYGD3YQJZ 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: 1702095780168100001 Signed-off-by: Hyman Huang --- 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