diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-04-26 09:12:31 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-04-26 09:12:31 +0100 |
commit | 8e383d19b4486355630c78944e4751fb953bef1c (patch) | |
tree | 42c4c011809846a34e6204771cebf347e723e8d2 /tests/migration-test.c | |
parent | 4743c23509a51bd4ee85cc272287a41917d1be35 (diff) | |
parent | da3f56cb2e767016d3f204837a77caf35b463f90 (diff) |
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180425a' into staging
Migration pull for 2.13
Alexey Perevalov postcopy blocktime statistics
Xiao Guangrong's compression performance improvements
# gpg: Signature made Wed 25 Apr 2018 20:21:13 BST
# gpg: using RSA key 0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7
* remotes/dgilbert/tags/pull-migration-20180425a:
migration: remove ram_save_compressed_page()
migration: introduce save_normal_page()
migration: move calling save_zero_page to the common place
migration: move calling control_save_page to the common place
migration: move some code to ram_save_host_page
migration: introduce control_save_page()
migration: detect compression and decompression errors
migration: stop decompression to allocate and free memory frequently
migration: stop compression to allocate and free memory frequently
migration: stop compressing page in migration thread
migration: add postcopy total blocktime into query-migrate
migration: add blocktime calculation into migration-test
migration: postcopy_blocktime documentation
migration: calculate vCPU blocktime on dst side
migration: add postcopy blocktime ctx into MigrationIncomingState
migration: introduce postcopy-blocktime capability
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/migration-test.c')
-rw-r--r-- | tests/migration-test.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/migration-test.c b/tests/migration-test.c index 422bf1afdf..dde7c464c3 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -26,6 +26,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> @@ -55,6 +56,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; @@ -223,6 +225,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) { while (true) { @@ -533,6 +545,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 @@ -559,6 +572,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, true); |