qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] tests/qtest: make migration-test massively faster
@ 2023-04-21 17:14 Daniel P. Berrangé
  2023-04-21 17:14 ` [PATCH v2 1/6] tests/qtest: replace qmp_discard_response with qtest_qmp_assert_success Daniel P. Berrangé
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Daniel P. Berrangé @ 2023-04-21 17:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Paolo Bonzini, Thomas Huth, John Snow, Li Zhijian,
	Juan Quintela, Stefan Hajnoczi, Zhang Chen, Laurent Vivier,
	Daniel P. Berrangé

This makes migration-test faster by observing that most of the pre-copy
tests don't need to be doing a live migration. They get sufficient code
coverage with the guest CPUs paused.

On my machine this cuts the overall execution time of migration-test
by 50% from 15 minutes, down to 8 minutes, without sacrificing any
noticeable code coverage.

This is still quite slow though.

The tests which do still run in live mode all want to guarantee there
are at least 2 iterations of migration, to exercise the dirty page
handling code. This is achieved by running the 1 iteration with an
incredibly small bandwidth and max downtime to prevent convergance,
and watching query-migrate for the reported iteration to increment.
This guarantees that all the tests take at least 30 seconds to run.

Watching for the iteration counter to flip is inefficient and not
actually needed. Instead we merely need to prove that some amount
of already transferred data has been made dirty again. This in turn
will guarantee that a further iteration is required beyond the current
one. This proof is easy to achieve by monitoring the values at two
distinct addresses in guest RAM, and can cut the 30 second duration
down to 1 second.

After this optimization, and Juan's patch to disable autoconverge
testnig, the migration test runs in merely 1 minute which I think
it pretty impressive given the number of scenarios we're testing.

Daniel P. Berrangé (5):
  tests/qtest: replace qmp_discard_response with
    qtest_qmp_assert_success
  tests/qtests: remove migration test iterations config
  tests/qtest: capture RESUME events during migration
  tests/qtest: make more migration pre-copy scenarios run non-live
  tests/qtest: massively speed up migration-tet

Juan Quintela (1):
  tests/migration: Only run auto_converge in slow mode

 tests/qtest/ahci-test.c              |  31 ++--
 tests/qtest/boot-order-test.c        |   5 +-
 tests/qtest/fdc-test.c               |  15 +-
 tests/qtest/ide-test.c               |   5 +-
 tests/qtest/migration-helpers.c      |  12 +-
 tests/qtest/migration-helpers.h      |   1 +
 tests/qtest/migration-test.c         | 252 +++++++++++++++++++--------
 tests/qtest/test-filter-mirror.c     |   5 +-
 tests/qtest/test-filter-redirector.c |   7 +-
 tests/qtest/virtio-blk-test.c        |  24 +--
 10 files changed, 227 insertions(+), 130 deletions(-)

-- 
2.40.0



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-05-31 12:16 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-21 17:14 [PATCH v2 0/6] tests/qtest: make migration-test massively faster Daniel P. Berrangé
2023-04-21 17:14 ` [PATCH v2 1/6] tests/qtest: replace qmp_discard_response with qtest_qmp_assert_success Daniel P. Berrangé
2023-04-21 21:52   ` Juan Quintela
2023-04-23  2:22   ` Zhang, Chen
2023-04-21 17:14 ` [PATCH v2 2/6] tests/qtests: remove migration test iterations config Daniel P. Berrangé
2023-04-21 21:54   ` Juan Quintela
2023-04-26  9:07     ` Daniel P. Berrangé
2023-04-26  9:42       ` Juan Quintela
2023-04-26 10:15         ` Daniel P. Berrangé
2023-04-21 17:14 ` [PATCH v2 3/6] tests/qtest: capture RESUME events during migration Daniel P. Berrangé
2023-04-21 21:59   ` Juan Quintela
2023-04-24  9:53     ` Daniel P. Berrangé
2023-05-26 11:56       ` Daniel P. Berrangé
2023-04-21 17:14 ` [PATCH v2 4/6] tests/qtest: make more migration pre-copy scenarios run non-live Daniel P. Berrangé
2023-04-21 22:06   ` Juan Quintela
2023-04-24 21:01   ` Fabiano Rosas
2023-05-26 17:58     ` Daniel P. Berrangé
2023-05-31 12:15       ` Daniel P. Berrangé
2023-04-21 17:14 ` [PATCH v2 5/6] tests/qtest: massively speed up migration-tet Daniel P. Berrangé
2023-04-21 22:15   ` Juan Quintela
2023-04-21 17:14 ` [PATCH v2 6/6] tests/migration: Only run auto_converge in slow mode Daniel P. Berrangé
2023-04-23  2:41   ` Zhang, Chen
2023-04-24  5:58     ` Juan Quintela
2023-04-24  6:56       ` Thomas Huth
2023-04-24  8:05         ` Zhang, Chen
2023-04-24  8:06   ` Zhang, Chen

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).