From nobody Tue Nov 26 15:35:28 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=bytedance.com ARC-Seal: i=1; a=rsa-sha256; t=1707261696; cv=none; d=zohomail.com; s=zohoarc; b=f0l9DuvC1Z4f+CTdNjfzXghstDbMjvA4/iTnQrhIQwnyYVeNgzpL15B5Xm2hLRy14gN2q0AANDAfiqJ4c+1n5lE9MJXx9NjYINxWW/ySvnD+ZmyKMELtJS1Nf8iLw/pGTz+mW6ay+lTWLsEPz48p18UrcEG2w0vXKn0jB1tz8uE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707261696; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fpkOjImJK+FSoyIVEziU9Gl/0F3Bqogyd5w1Dik58Qw=; b=MEyHJuNSAA2yIKN3eoAau3qhzw2EKntGyLWRnBH2pi8Y+pENty0ObwQPXJ40VD9epP8nyqPpHx8HAfPYCsb+GYBKz//hcBBpz5wfHm2mUJvXF35kri+hb5KaUkkUk/wVRj5mKMDk8Yq1JhglKn+Cza+wMUGfZNzShYDqQgPMERY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1707261696563282.07041241942534; Tue, 6 Feb 2024 15:21:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXUjv-0006DL-DY; Tue, 06 Feb 2024 18:20:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXUjt-0006CF-0h for qemu-devel@nongnu.org; Tue, 06 Feb 2024 18:20:29 -0500 Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXUjm-0005nf-Nj for qemu-devel@nongnu.org; Tue, 06 Feb 2024 18:20:28 -0500 Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-7d5bddb0f4cso2286941241.2 for ; Tue, 06 Feb 2024 15:20:22 -0800 (PST) Received: from n231-230-216.byted.org ([130.44.215.112]) by smtp.gmail.com with ESMTPSA id d11-20020a67b60b000000b0046d20ce8886sm2352vsm.1.2024.02.06.15.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 15:20:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1707261621; x=1707866421; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fpkOjImJK+FSoyIVEziU9Gl/0F3Bqogyd5w1Dik58Qw=; b=hPC2a57WoIZ1Z9vtAcwWSvzVvdosl0KNvpPV8NV+jShrEFi1R+ARl3VVnN6CleDcI4 ZA1oJy8fmIeEzeQtUr8EMkb60bJVSUD2Om9lwT/4NFgOLhnAJ4Y2xzFxc506n9zQdeht jtRjyuPF0eCZJm8BoGMFIHbVAvMgBEO4s1NGDzX1QaPF5vxdxRYReEeGpVf15GsNhLcE vsinzgagxnoGIfZNLozIt2lbLMfvhmlv+qRNs6GW3VnG4mjXIeempW3Jxxwb2BGA/x+U +FciptfHzF/qc/Pz2TnMEvm9vF5ctINWXx0J5oRcS759Rxx4Qvd/IDMrQXbqK4E9VbES kcpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707261621; x=1707866421; 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=fpkOjImJK+FSoyIVEziU9Gl/0F3Bqogyd5w1Dik58Qw=; b=MgKhDMhpMG5EO6SPV45ZoJSMZfSzh0MqRaQb75kn9XJ3qSVyPw1bzsAJPn1e/9vDm0 ptzjbBUNPqg7tV8zo6OsmWvuLW5kgQcMMejKDYVWlHb3eaHchuot+dhCgN6mTOFk7m0l CcIdpxQshpNwUEOkh5nIVY5OOp6l6UkR8BmDHph3b2sJJ902zbWgaFYOqzXGKcJBJZh4 9dwhA5W1vZ8oiJ/GhsHD7LrGYgAoq4KYtd+uIMAUURxLAwUouuj/eEusucpsrujF6qmK 438aQ9rmouoVvkN9CkUqs5o3TdQXin/89bt6/0L9dGFL5tX1dIuUJvuUySP6hFrzCez9 vvcQ== X-Gm-Message-State: AOJu0YzPLMDInP+/3XwRbpysuZMnkZsk1dhQYd1VcBqxMb6Ro61bNSUh 4JQXgIFsE1oCVt0+KxWYf9MSpEpS0o0VPO5/rIeEYC017hlcdBRBTIgkVy56tqnv3GlJxS9Ax59 iErg= X-Google-Smtp-Source: AGHT+IGK6v7quUmYPNzLqEgzOsHH+O6f8yujk+X1Lu/Lk3iHOgStbsXDt4H1srKfgcLSJymCPFH14g== X-Received: by 2002:a05:6102:5f5a:b0:46d:1785:426c with SMTP id il26-20020a0561025f5a00b0046d1785426cmr1177438vsb.0.1707261620891; Tue, 06 Feb 2024 15:20:20 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWzKqLpi2f3ZEutclyNlE0g23N/egQMDhhywflO2Ht6Nv0s2HiyK5SfnRXykAwQ7Q7CInDnvCQxprJQZJJ9+JaQ2bDJ2edPLHpbe0DZcrYUHJjr From: Hao Xiang To: qemu-devel@nongnu.org, farosas@suse.de, peterx@redhat.com Cc: Hao Xiang Subject: [PATCH 6/6] migration/multifd: Add a new migration test case for legacy zero page checking. Date: Tue, 6 Feb 2024 23:19:08 +0000 Message-Id: <20240206231908.1792529-7-hao.xiang@bytedance.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240206231908.1792529-1-hao.xiang@bytedance.com> References: <20240206231908.1792529-1-hao.xiang@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::92e; envelope-from=hao.xiang@bytedance.com; helo=mail-ua1-x92e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @bytedance.com) X-ZM-MESSAGEID: 1707261698192100003 Content-Type: text/plain; charset="utf-8" Now that zero page checking is done on the multifd sender threads by default, we still provide an option for backward compatibility. This change adds a qtest migration test case to set the multifd-zero-page option to false and run multifd migration with zero page checking on the migration main thread. Signed-off-by: Hao Xiang --- tests/qtest/migration-test.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 7675519cfa..2c13df04c3 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -2621,6 +2621,15 @@ test_migrate_precopy_tcp_multifd_start(QTestState *f= rom, return test_migrate_precopy_tcp_multifd_start_common(from, to, "none"); } =20 +static void * +test_migrate_precopy_tcp_multifd_start_zero_page_legacy(QTestState *from, + QTestState *to) +{ + test_migrate_precopy_tcp_multifd_start_common(from, to, "none"); + migrate_set_parameter_bool(from, "multifd-zero-page", false); + return NULL; +} + static void * test_migrate_precopy_tcp_multifd_zlib_start(QTestState *from, QTestState *to) @@ -2652,6 +2661,21 @@ static void test_multifd_tcp_none(void) test_precopy_common(&args); } =20 +static void test_multifd_tcp_zero_page_legacy(void) +{ + MigrateCommon args =3D { + .listen_uri =3D "defer", + .start_hook =3D test_migrate_precopy_tcp_multifd_start_zero_page_l= egacy, + /* + * Multifd is more complicated than most of the features, it + * directly takes guest page buffers when sending, make sure + * everything will work alright even if guest page is changing. + */ + .live =3D true, + }; + test_precopy_common(&args); +} + static void test_multifd_tcp_zlib(void) { MigrateCommon args =3D { @@ -3550,6 +3574,8 @@ int main(int argc, char **argv) } migration_test_add("/migration/multifd/tcp/plain/none", test_multifd_tcp_none); + migration_test_add("/migration/multifd/tcp/plain/zero_page_legacy", + test_multifd_tcp_zero_page_legacy); migration_test_add("/migration/multifd/tcp/plain/cancel", test_multifd_tcp_cancel); migration_test_add("/migration/multifd/tcp/plain/zlib", --=20 2.30.2