All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] migration: Fix issues during qmp_migrate_cancel
@ 2024-12-02 22:01 Fabiano Rosas
  2024-12-02 22:01 ` [PATCH 1/6] tests/qtest/migration: Introduce migration_test_add_suffix Fabiano Rosas
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Fabiano Rosas @ 2024-12-02 22:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, Daniel P . Berrangé

Hi,

While working on downstream issues with postcopy, I ended up writing a
set of tests for issuing qmp_migrate_cancel() at various points during
the migration. That exposed some bugs, which this series attempts to
fix.

There is also a fix for the issue Daniel found:

https://gitlab.com/qemu-project/qemu/-/issues/2633

I'm also sending the test code. It creates one test per
MIGRATION_STATUS_ state. Each test starts a migration, waits for that
specific state to be reached, issues qmp_migrate_cancel() and checks
that the migration state changes to cancelled (for now only cancelling
migration from the source side).

I was initially worried that this would be too racy, but so far each
test has survived 1000 iterations. I'm thinking it's worth merging,
specially because even after working on this I haven't been able to
clear the questions we have in our todo list [1], so we'll probably
need more work around this area in the future.

1- https://wiki.qemu.org/ToDo/LiveMigration#Migration_cancel_concurrency

CI run: https://gitlab.com/farosas/qemu/-/pipelines/1569870481

Thanks

Fabiano Rosas (6):
  tests/qtest/migration: Introduce migration_test_add_suffix
  migration: Kick postcopy threads on cancel
  migration: Fix postcopy listen thread exit
  migration: Make sure postcopy recovery doesn't hang when cancelling
  migration: Fix hang after error in destination setup phase
  tests/qtest/migration: Add a cancel test

 migration/channel.c             |  11 +-
 migration/migration.c           |  58 +++++---
 migration/migration.h           |   2 +-
 migration/postcopy-ram.c        |  14 +-
 migration/savevm.c              |  60 ++++----
 tests/qtest/migration-helpers.c |  24 ++++
 tests/qtest/migration-helpers.h |   2 +
 tests/qtest/migration-test.c    | 243 ++++++++++++++++++++++++++++++++
 8 files changed, 365 insertions(+), 49 deletions(-)

-- 
2.35.3



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

end of thread, other threads:[~2024-12-05 15:44 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 22:01 [PATCH 0/6] migration: Fix issues during qmp_migrate_cancel Fabiano Rosas
2024-12-02 22:01 ` [PATCH 1/6] tests/qtest/migration: Introduce migration_test_add_suffix Fabiano Rosas
2024-12-04 18:44   ` Peter Xu
2024-12-02 22:01 ` [PATCH 2/6] migration: Kick postcopy threads on cancel Fabiano Rosas
2024-12-04 18:39   ` Peter Xu
2024-12-04 19:02     ` Fabiano Rosas
2024-12-04 19:39       ` Peter Xu
2024-12-04 20:02         ` Daniel P. Berrangé
2024-12-04 20:40           ` Fabiano Rosas
2024-12-04 20:59             ` Peter Xu
2024-12-04 20:51           ` Peter Xu
2024-12-04 21:01             ` Fabiano Rosas
2024-12-04 21:11               ` Peter Xu
2024-12-05 10:52             ` Daniel P. Berrangé
2024-12-05 13:18               ` Fabiano Rosas
2024-12-05 15:03                 ` Peter Xu
2024-12-05 15:44                   ` Daniel P. Berrangé
2024-12-05 15:40                 ` Daniel P. Berrangé
2024-12-02 22:01 ` [PATCH 3/6] migration: Fix postcopy listen thread exit Fabiano Rosas
2024-12-02 22:01 ` [PATCH 4/6] migration: Make sure postcopy recovery doesn't hang when cancelling Fabiano Rosas
2024-12-02 22:01 ` [PATCH 5/6] migration: Fix hang after error in destination setup phase Fabiano Rosas
2024-12-04 18:44   ` Peter Xu
2024-12-04 19:05     ` Fabiano Rosas
2024-12-02 22:01 ` [PATCH 6/6] tests/qtest/migration: Add a cancel test Fabiano Rosas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.