From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, lvivier@redhat.com, peterx@redhat.com,
Alexey Perevalov <a.perevalov@samsung.com>
Subject: [Qemu-devel] [PULL 11/14] migration: add blocktime calculation into migration-test
Date: Wed, 3 Jan 2018 10:38:31 +0100 [thread overview]
Message-ID: <20180103093834.20879-12-quintela@redhat.com> (raw)
In-Reply-To: <20180103093834.20879-1-quintela@redhat.com>
From: Alexey Perevalov <a.perevalov@samsung.com>
This patch just requests blocktime calculation,
and check it in case when UFFD_FEATURE_THREAD_ID feature is set
on the host.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
tests/migration-test.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/migration-test.c b/tests/migration-test.c
index 799e24ebc6..9fd5dadc0d 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -25,6 +25,7 @@
const unsigned start_address = 1024 * 1024;
const unsigned end_address = 100 * 1024 * 1024;
bool got_stop;
+static bool uffd_feature_thread_id;
#if defined(__linux__)
#include <sys/syscall.h>
@@ -54,6 +55,7 @@ static bool ufd_version_check(void)
g_test_message("Skipping test: UFFDIO_API failed");
return false;
}
+ uffd_feature_thread_id = api_struct.features & UFFD_FEATURE_THREAD_ID;
ioctl_mask = (__u64)1 << _UFFDIO_REGISTER |
(__u64)1 << _UFFDIO_UNREGISTER;
@@ -266,6 +268,16 @@ static uint64_t get_migration_pass(QTestState *who)
return result;
}
+static void read_blocktime(QTestState *who)
+{
+ QDict *rsp, *rsp_return;
+
+ rsp = wait_command(who, "{ 'execute': 'query-migrate' }");
+ rsp_return = qdict_get_qdict(rsp, "return");
+ g_assert(qdict_haskey(rsp_return, "postcopy-blocktime"));
+ QDECREF(rsp);
+}
+
static void wait_for_migration_complete(QTestState *who)
{
QDict *rsp, *rsp_return;
@@ -525,6 +537,7 @@ static void test_migrate(void)
migrate_set_capability(from, "postcopy-ram", "true");
migrate_set_capability(to, "postcopy-ram", "true");
+ migrate_set_capability(to, "postcopy-blocktime", "true");
/* We want to pick a speed slow enough that the test completes
* quickly, but that it doesn't complete precopy even on a slow
@@ -553,6 +566,9 @@ static void test_migrate(void)
wait_for_serial("dest_serial");
wait_for_migration_complete(from);
+ if (uffd_feature_thread_id) {
+ read_blocktime(to);
+ }
g_free(uri);
test_migrate_end(from, to);
--
2.14.3
next prev parent reply other threads:[~2018-01-03 9:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 9:38 [Qemu-devel] [PULL 00/14] Migration pull request Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 01/14] migration: Use proper types in json Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 02/14] migration: print features as on off Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 03/14] migration: free addr in the same function that we created it Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 04/14] docs: Convert migration.txt to rst Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 05/14] migration: free result string Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 06/14] migration: fix analyze-migration.py script with radix table Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 07/14] migration: introduce postcopy-blocktime capability Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 08/14] migration: add postcopy blocktime ctx into MigrationIncomingState Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 09/14] migration: calculate vCPU blocktime on dst side Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 10/14] migration: postcopy_blocktime documentation Juan Quintela
2018-01-03 9:38 ` Juan Quintela [this message]
2018-01-03 9:38 ` [Qemu-devel] [PULL 12/14] migration: add postcopy total blocktime into query-migrate Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 13/14] migration: Guard ram_bytes_remaining against early call Juan Quintela
2018-01-03 9:38 ` [Qemu-devel] [PULL 14/14] migration: finalize current_migration object Juan Quintela
2018-01-05 0:30 ` [Qemu-devel] [PULL 00/14] Migration pull request Eric Blake
2018-01-05 9:29 ` Dr. David Alan Gilbert
2018-01-05 9:59 ` Juan Quintela
2018-01-09 18:24 ` Peter Maydell
2018-01-09 18:28 ` Juan Quintela
2018-01-10 4:58 ` Alexey Perevalov
2018-01-11 11:51 ` Peter Maydell
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=20180103093834.20879-12-quintela@redhat.com \
--to=quintela@redhat.com \
--cc=a.perevalov@samsung.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).