qemu/tests
Daniel P. Berrangé e02f56e3de tests/qtest: massively speed up migration-test
The migration test cases that actually exercise live migration want to
ensure there is a minimum of two iterations of pre-copy, in order to
exercise the dirty tracking code.

Historically we've queried the migration status, looking for the
'dirty-sync-count' value to increment to track iterations. This was
not entirely reliable because often all the data would get transferred
quickly enough that the migration would finish before we wanted it
to. So we massively dropped the bandwidth and max downtime to
guarantee non-convergance. This had the unfortunate side effect
that every migration took at least 30 seconds to run (100 MB of
dirty pages / 3 MB/sec).

This optimization takes a different approach to ensuring that a
mimimum of two iterations. Rather than waiting for dirty-sync-count
to increment, directly look for an indication that the source VM
has dirtied RAM that has already been transferred.

On the source VM a magic marker is written just after the 3 MB
offset. The destination VM is now montiored to detect when the
magic marker is transferred. This gives a guarantee that the
first 3 MB of memory have been transferred. Now the source VM
memory is monitored at exactly the 3MB offset until we observe
a flip in its value. This gives us a guaranteed that the guest
workload has dirtied a byte that has already been transferred.

Since we're looking at a place that is only 3 MB from the start
of memory, with the 3 MB/sec bandwidth, this test should complete
in 1 second, instead of 30 seconds.

Once we've proved there is some dirty memory, migration can be
set back to full speed for the remainder of the 1st iteration,
and the entire of the second iteration at which point migration
should be complete.

On a test machine this further reduces the migration test time
from 8 minutes to 1 minute 40.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-11-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-07-10 15:34:57 +02:00
..
avocado tests/avocado: Add powernv machine test script 2023-07-07 04:47:49 -03:00
bench migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
data tests/data/acpi: update after SMBIOS 2.0 change 2023-06-26 09:50:00 -04:00
decode decodetree: Add --output-null for meson testing 2023-05-31 19:56:42 -07:00
docker tests/docker: convert riscv64-cross to lcitool 2023-07-03 12:51:53 +01:00
fp tests: fp: remove unused submodules 2023-06-07 11:05:09 +02:00
guest-debug gdbstub: add test for untimely stop-reply packets 2023-05-18 12:40:52 -07:00
image-fuzzer
include
keys
lcitool tests/docker: convert riscv64-cross to lcitool 2023-07-03 12:51:53 +01:00
migration meson: Add static glib dependency for initrd-stress.img 2023-05-26 12:34:17 +02:00
multiboot
perf/block/qcow2
plugin plugins: fix memory leak while parsing options 2023-07-03 12:51:58 +01:00
qapi-schema qapi: Improve error message for description following section 2023-05-22 10:03:26 +02:00
qemu-iotests iotests: Test active commit with iothread and background I/O 2023-06-28 08:45:46 +02:00
qtest tests/qtest: massively speed up migration-test 2023-07-10 15:34:57 +02:00
rocker
tcg tests/tcg/s390x: Fix test-svc with clang 2023-07-10 15:34:57 +02:00
tsan
uefi-test-tools
unit test-block-iothread: Lock AioContext for blk_insert_bs() 2023-06-28 08:46:08 +02:00
vm tests: Use separate virtual environment for avocado 2023-06-06 16:29:53 +02:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests: Use separate virtual environment for avocado 2023-06-06 16:29:53 +02:00
meson.build tests/decode: Convert tests to meson 2023-05-30 10:55:39 -07:00
requirements.txt tests: Use separate virtual environment for avocado 2023-06-06 16:29:53 +02:00
test-qht-par.c
vhost-user-bridge.c