qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Hao Xiang <hao.xiang@bytedance.com>,
	pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net,
	peterx@redhat.com, eblake@redhat.com, armbru@redhat.com,
	thuth@redhat.com, lvivier@redhat.com, qemu-devel@nongnu.org,
	jdenemar@redhat.com
Cc: Hao Xiang <hao.xiang@bytedance.com>
Subject: Re: [PATCH v2 5/7] migration/multifd: Add new migration test cases for legacy zero page checking.
Date: Wed, 21 Feb 2024 17:59:01 -0300	[thread overview]
Message-ID: <878r3dbkkq.fsf@suse.de> (raw)
In-Reply-To: <20240216224002.1476890-6-hao.xiang@bytedance.com>

Hao Xiang <hao.xiang@bytedance.com> writes:

> 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 zero-page-detection
> option to "legacy" and run multifd migration with zero page checking on the
> migration main thread.
>
> Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
> ---
>  tests/qtest/migration-test.c | 52 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index 8a5bb1752e..c27083110a 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -2621,6 +2621,24 @@ test_migrate_precopy_tcp_multifd_start(QTestState *from,
>      return test_migrate_precopy_tcp_multifd_start_common(from, to, "none");
>  }
>  
> +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_str(from, "zero-page-detection", "legacy");
> +    return NULL;
> +}
> +
> +static void *
> +test_migration_precopy_tcp_multifd_start_no_zero_page(QTestState *from,
> +                                                      QTestState *to)
> +{
> +    test_migrate_precopy_tcp_multifd_start_common(from, to, "none");
> +    migrate_set_parameter_str(from, "zero-page-detection", "none");
> +    return NULL;
> +}
> +
>  static void *
>  test_migrate_precopy_tcp_multifd_zlib_start(QTestState *from,
>                                              QTestState *to)
> @@ -2652,6 +2670,36 @@ static void test_multifd_tcp_none(void)
>      test_precopy_common(&args);
>  }
>  
> +static void test_multifd_tcp_zero_page_legacy(void)
> +{
> +    MigrateCommon args = {
> +        .listen_uri = "defer",
> +        .start_hook = test_migrate_precopy_tcp_multifd_start_zero_page_legacy,
> +        /*
> +         * 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 = true,
> +    };
> +    test_precopy_common(&args);
> +}
> +
> +static void test_multifd_tcp_no_zero_page(void)
> +{
> +    MigrateCommon args = {
> +        .listen_uri = "defer",
> +        .start_hook = test_migration_precopy_tcp_multifd_start_no_zero_page,
> +        /*
> +         * 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 = true,
> +    };
> +    test_precopy_common(&args);
> +}
> +
>  static void test_multifd_tcp_zlib(void)
>  {
>      MigrateCommon args = {
> @@ -3550,6 +3598,10 @@ 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/no_zero_page",
> +                       test_multifd_tcp_no_zero_page);

Here it's better to separate the main feature from the states. That way
we can run only the zero-page tests with:

 migration-test -r /x86_64/migration/multifd/tcp/plain/zero-page

Like so: (also dashes instead of underscores)
/zero-page/legacy
/zero-page/none

>      migration_test_add("/migration/multifd/tcp/plain/cancel",
>                         test_multifd_tcp_cancel);
>      migration_test_add("/migration/multifd/tcp/plain/zlib",


  reply	other threads:[~2024-02-21 20:59 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 22:39 [PATCH v2 0/7] Introduce multifd zero page checking Hao Xiang
2024-02-16 22:39 ` [PATCH v2 1/7] migration/multifd: Add new migration option zero-page-detection Hao Xiang
2024-02-21 12:03   ` Markus Armbruster
2024-02-23  4:22     ` [External] " Hao Xiang
2024-02-21 13:58   ` Elena Ufimtseva
2024-02-23  4:37     ` [External] " Hao Xiang
2024-02-22 10:36   ` Peter Xu
2024-02-26  7:18   ` Wang, Lei
2024-02-26 19:45     ` [External] " Hao Xiang
2024-02-16 22:39 ` [PATCH v2 2/7] migration/multifd: Support for zero pages transmission in multifd format Hao Xiang
2024-02-21 15:37   ` Elena Ufimtseva
2024-02-23  4:18     ` [External] " Hao Xiang
2024-02-16 22:39 ` [PATCH v2 3/7] migration/multifd: Zero page transmission on the multifd thread Hao Xiang
2024-02-16 23:49   ` Richard Henderson
2024-02-23  4:38     ` [External] " Hao Xiang
2024-02-24 19:06       ` Hao Xiang
2024-02-21 12:04   ` Markus Armbruster
2024-02-21 16:00   ` Elena Ufimtseva
2024-02-23  4:59     ` [External] " Hao Xiang
2024-02-21 21:04   ` Fabiano Rosas
2024-02-23  2:20     ` Peter Xu
2024-02-23  5:15       ` [External] " Hao Xiang
2024-02-24 22:56         ` Hao Xiang
2024-02-26  1:30           ` Peter Xu
2024-02-23  5:18     ` Hao Xiang
2024-02-23 14:47       ` Fabiano Rosas
2024-02-16 22:39 ` [PATCH v2 4/7] migration/multifd: Enable zero page checking from multifd threads Hao Xiang
2024-02-21 16:11   ` Elena Ufimtseva
2024-02-23  5:24     ` [External] " Hao Xiang
2024-02-21 21:06   ` Fabiano Rosas
2024-02-23  2:33     ` Peter Xu
2024-02-23  6:02       ` [External] " Hao Xiang
2024-02-24 23:03         ` Hao Xiang
2024-02-26  1:43           ` Peter Xu
2024-02-23  5:47     ` Hao Xiang
2024-02-23 14:38       ` Fabiano Rosas
2024-02-16 22:40 ` [PATCH v2 5/7] migration/multifd: Add new migration test cases for legacy zero page checking Hao Xiang
2024-02-21 20:59   ` Fabiano Rosas [this message]
2024-02-23  4:20     ` [External] " Hao Xiang
2024-02-16 22:40 ` [PATCH v2 6/7] migration/multifd: Add zero pages and zero bytes counter to migration status interface Hao Xiang
2024-02-21 12:07   ` Markus Armbruster
2024-02-16 22:40 ` [PATCH v2 7/7] Update maintainer contact for migration multifd zero page checking acceleration Hao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878r3dbkkq.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=hao.xiang@bytedance.com \
    --cc=jdenemar@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).