From nobody Mon May 13 19:08:30 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 1701304221036623.7530135436228; Wed, 29 Nov 2023 16:30:21 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 607F91A6F; Wed, 29 Nov 2023 19:30:20 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BF3231B98; Wed, 29 Nov 2023 19:26:42 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 049AD1A96; Wed, 29 Nov 2023 19:26:21 -0500 (EST) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (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 34F411B45 for ; Wed, 29 Nov 2023 19:25:38 -0500 (EST) Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-6d856210057so251420a34.1 for ; Wed, 29 Nov 2023 16:25:38 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id w13-20020a65694d000000b005c6007a13b5sm11650pgq.25.2023.11.29.16.25.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:25: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=1701303937; x=1701908737; 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=3OafHPfKdeh2Ubs+blK4RPJGOoZXQxTdOI0Bp9WjoOE=; b=ZbaQQ3Ltj04kUA8IOt4dWmzxz1vhb2tEvJJ0iAGo69R6mPpSznGWq2ccD1eAsTyifx 1hYanq3ZuI6JsHhhj/9AAW/slHOvRS1qtVJbeePiRNt31VTI5eZCbuGIj2N8VCs9yiMx bmcOgcaX/JEy+3ah+YdOvZNjbhrjx8PsXLVWEJJ+ap3qi4o9+9t6KbwpAxIMldDoT/eC vdLzgZdmoK6t/BUlg3rTGYyQht/iLF6uAM/IeO8PInvXkWHoAs2UOcsOPcVPFBIixXsr 0xCjEtCjfZRzJTM5DnwV0jZrFQ26DVZlekZMe3vnuxPBGw773k0afpXsIVefnKxLlcTk UgXg== X-Gm-Message-State: AOJu0Yw+EUvhXD23/n9JWn/hb5FpqURX42WQXaY2Nofdk+4q3xI21jH8 noz4K7JtqyWng+WmMGHLBB3ls6miBX+qlwbjoUjNMyXW X-Google-Smtp-Source: AGHT+IF6gM6Ad7iiRm9nClYKsXNh8iNnK2rUDp6ALKH4IqivJME64zEG7VZtY/AnCR0D9RJHkOD/zg== X-Received: by 2002:a9d:66c6:0:b0:6d8:480f:7abf with SMTP id t6-20020a9d66c6000000b006d8480f7abfmr6434811otm.8.1701303936482; Wed, 29 Nov 2023 16:25:36 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH v2 1/4] Add VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 30 Nov 2023 08:25:23 +0800 Message-Id: <3f1ee9881b3f74fe093f6f096143ca6428d2e88d.1701303760.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 6QSHKR467D6FHZI4Q2X43ISSHD2SJQD6 X-Message-ID-Hash: 6QSHKR467D6FHZI4Q2X43ISSHD2SJQD6 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: 1701304222994000001 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..1bd22cc2dc 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.10.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 Mon May 13 19:08:30 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 1701304319276625.9512881464951; Wed, 29 Nov 2023 16:31:59 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9CB451711; Wed, 29 Nov 2023 19:31:58 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 7C9271B9C; Wed, 29 Nov 2023 19:26:51 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6FB231A63; Wed, 29 Nov 2023 19:26:25 -0500 (EST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 A55F71B58 for ; Wed, 29 Nov 2023 19:25:40 -0500 (EST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5c18a3387f5so343445a12.1 for ; Wed, 29 Nov 2023 16:25:40 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id w13-20020a65694d000000b005c6007a13b5sm11650pgq.25.2023.11.29.16.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:25: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=1701303939; x=1701908739; 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=ssVTqjV18/hWZ/myuGnXkRzHtLXmIqjmkfqd1c+fJetEunEmPYYi0EP+wT1/7/KXT1 nfo5iazybtcVGflkAh9rH+v077xyZy9gZ7BOnPge/Q5BJnbjSmma+CLF8rdH5AJe7NAk ptcIhrvic0rPZPFapJM06728EJju2LU0a7AHXfyANip3KVDRNadawKnCXjkUCvHAkg5l AfEb9K8zVmj5PEeSi8XGAExoTllUq2N+u97TI0lZPriSKEYSFF2ban+SxJP+rI1/fl13 2tuqPNgURQt4M4X2fY5tG/G6udeRwAnK96/4QCIpQNQfClFYb5s91puUM4oeTXJftcVl Lqcg== X-Gm-Message-State: AOJu0YyLBYkCF4wtaybs5LyBZjA8qaBrUWtmbJGpvxh4AURTo32cmE1G Ieal6/JZzPiDsMz2vjl6YRx4aXMQ/45YQHh19R2GabrH X-Google-Smtp-Source: AGHT+IFs2Jl43F9/EUN+SdylNPOf8Jk/5dQ+ObqTe7KTMZ4XCzzufaBsLh5DhYpVoT63/a8suNZyhQ== X-Received: by 2002:a05:6a20:144e:b0:18a:d766:cae1 with SMTP id a14-20020a056a20144e00b0018ad766cae1mr18200983pzi.54.1701303938771; Wed, 29 Nov 2023 16:25:38 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH v2 2/4] qemu_migration: Implement VIR_MIGRATE_DIRTY_LIMIT flag Date: Thu, 30 Nov 2023 08:25:24 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: O6WXF5QWN7QQ2PDP3NVKVUZIHIUAARN3 X-Message-ID-Hash: O6WXF5QWN7QQ2PDP3NVKVUZIHIUAARN3 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: 1701304321281000001 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 Mon May 13 19:08:30 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 1701304400144612.3296807197901; Wed, 29 Nov 2023 16:33:20 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 4AE081B54; Wed, 29 Nov 2023 19:33:19 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 3E1B81BAA; Wed, 29 Nov 2023 19:26:58 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9099216F8; Wed, 29 Nov 2023 19:26:25 -0500 (EST) Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.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 C28C81AD6 for ; Wed, 29 Nov 2023 19:25:42 -0500 (EST) Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-58ce8513da1so255637eaf.2 for ; Wed, 29 Nov 2023 16:25:42 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id w13-20020a65694d000000b005c6007a13b5sm11650pgq.25.2023.11.29.16.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:25: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_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=1701303942; x=1701908742; 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=EomARCLe7SABc5vF2ntfEFMiAAyyx8Xo/IKOW99G2CAOonuqrZI31b1x6IX5f8XprT VuagHfZx8M+uTirqJlg5+M8B66bbxD10nJEluuEgBLE9mMdqpGDQVFzruJy9ZNEKC1D5 Xww4vcoI+wmnsPQg9ztvWNzHhxKkYZXOFF7jMoR8h1k+tzxGu4fi5cV3mzHYR9rWlucl KueEaPqQzRjCAPZGbMijdzrRVr/25l4SLONDe9HJLngF3XuJMdlgZX7kaL5gGQvytz04 UIyQvFJ81YtkQUWflgK0A2kocX+e/4R05kLf6ZAAeJT8O0fXiwQbqUL9Nq7JTdrmcx2c 5VhQ== X-Gm-Message-State: AOJu0YwW6xrJF0wW1BaYi86k7ynsKy9Kh+KDj3shga2P9diGOBfCNvbu C7LgULcVFvzODRS1TuJ0JQZQeaDLEuJs3rzyQZLXCj/r X-Google-Smtp-Source: AGHT+IFmh3th7Vbs12t9zL70Ge9hKzTqwWiQecW8Nmx2RrxR4JdFxC0jY5ToO2S8FqdO40hhJK+4FA== X-Received: by 2002:a05:6358:2919:b0:16d:bb7b:c0a7 with SMTP id y25-20020a056358291900b0016dbb7bc0a7mr20619913rwb.10.1701303941298; Wed, 29 Nov 2023 16:25:41 -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: Thu, 30 Nov 2023 08:25:25 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: YVJWGUUSCB7GDPZGKK2JVGXMES75BU36 X-Message-ID-Hash: YVJWGUUSCB7GDPZGKK2JVGXMES75BU36 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: 1701304401772000001 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 Mon May 13 19:08:30 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 1701304457628142.6617796770746; Wed, 29 Nov 2023 16:34:17 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 0C2BD1B11; Wed, 29 Nov 2023 19:34:17 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D767F1BA9; Wed, 29 Nov 2023 19:27:05 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6B4B71B25; Wed, 29 Nov 2023 19:26:28 -0500 (EST) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (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 732761A44 for ; Wed, 29 Nov 2023 19:25:45 -0500 (EST) Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3b845ba9ba9so221857b6e.3 for ; Wed, 29 Nov 2023 16:25:45 -0800 (PST) Received: from localhost.localdomain ([118.114.59.192]) by smtp.gmail.com with ESMTPSA id w13-20020a65694d000000b005c6007a13b5sm11650pgq.25.2023.11.29.16.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:25:43 -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=1701303944; x=1701908744; 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=uD+0114OT0W4rsZrKL46wZPqg8kNOPG5Gj9wF9nYQMuHWzRxx4yfgrbPbfD5cPK1p0 3vOWfbxkwTv3W4Aa9s2rNUT4vjX4w1IZu7lqvxcHp835lwmusOzhjApmfXuNndHgPSmG LM536WnQnem0Gf3+winpLYu2Cu3BLRsHisYzK+Fevc3j6hPkR/TDJ3WozlGwlbssl43Q MmAAiSVz/I3f+l7vl6LFPgOA/G49xcXG5wALqFO0XnUrt8LstzAoDbHHC0ropURXuRrl g7EevmvLGaTTnDqqyDQV9K/gHu1NDoVBOAJBdGXEvV72i/aeFsfKkc2Ei+k6ajiqXW23 4xJw== X-Gm-Message-State: AOJu0YzhfFegoPg/YnZHHcpFGizp/e1ROiYf+xTgOPEzD7lUo4lP/bLC jujHixLoIMtmiL7woItYzySLoEczfhUdEunlhXbuky+O X-Google-Smtp-Source: AGHT+IHZbV54AfOZJsTex+GBOw45wo5bAb/Pmqu2peNUW0z20IgnSqgWRSCJoJbtx9WasHHu64Z6Lw== X-Received: by 2002:a05:6808:f09:b0:3ae:bae2:fa76 with SMTP id m9-20020a0568080f0900b003aebae2fa76mr26507634oiw.36.1701303943782; Wed, 29 Nov 2023 16:25:43 -0800 (PST) From: Hyman Huang To: devel@lists.libvirt.org Subject: [PATCH v2 4/4] NEWS: document support for dirty-limit live migration Date: Thu, 30 Nov 2023 08:25:26 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 2VWQVNDRNOYB2SGH6JJSKJZKQHHOZMVV X-Message-ID-Hash: 2VWQVNDRNOYB2SGH6JJSKJZKQHHOZMVV 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: 1701304459729000001 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