Skip to content

RFC migration: enable return-path for precopy

Peter Xu qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 32 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6io: only allow return path for socket typedinclude/io/channel.h io/channel-socket.c migration/qemu-file-channel.c+11 -014 replies
2/6migration: isolate return path on srcmigration/migration.c migration/trace-events+37 -171 reply
3/6migration: fix leak of src file on dstmigration/migration.c+5 -02 replies
4/6migration: shut src return path unconditionallymigration/migration.c migration/postcopy-ram.c+7 -27 replies
5/6migration: let MigrationState be an QObjectinclude/migration/migration.h include/qemu/typedefs.h migration/migration.c+60 -222 replies
6/6migration: enable return path for precopyinclude/hw/compat.h include/migration/migration.h migration/migration.c+21 -15 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchJuan QuintelaDr. David Alan Gilbert
1/6R-b
2/6
3/6R-b R-b
4/6R-b R-b
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH RFC 0/6] migration: enable return-path for precopy

This idea derives from the bug reported:

https://bugzilla.redhat.com/show_bug.cgi?id=1439147

It is not a extremely critical bug, since as long as the user uses libvirt to migrate, we won't have such an issue at all (we'll have identical command line parameters for QEMU). However it can be an severe one, since it caused data loss (source VM will quit assuming that destination VM is good, while it is not). So it would be good we fix it. Meanwhile, imho the return path may be used for other things as well in the future.

This series proposed a solution for the bug - let's enable return path even for precopy when possible, then source can know whether dest is good or not, then it can decide to do something better than quit.

The series is marked as RFC for two reasons:

One point for RFC is the idea in general that whether we would like to enable return path for precopy. I see it okay since after all it's optional (so it greatly reduces the chance that QEMU command line user will lose the data, and this feature will be automatically off when we are using e.g. "exec:" to migrate to a file).

The other one point is that I converted MigrationState into a QObject (actually a QDevice) to let migration codes benefits from some general framework advantages.

I got at least one positive feedback on each of the RFC elements mentioned above, so dare I post this to public. Though I guess some migration reviewers may be on PTO recently (I just know it :), I still decided to post this out for a broader rfc review.

Smoke test done, and of course I verified this series to fix the bug mentioned.

Please review. Thanks.

Peter Xu (6):
io: only allow return path for socket typed
migration: isolate return path on src
migration: fix leak of src file on dst
migration: shut src return path unconditionally
migration: let MigrationState be an QObject
migration: enable return path for precopy

 include/hw/compat.h           |   4 ++
 include/io/channel.h          |   1 +
 include/migration/migration.h |  27 ++++++++-
 include/qemu/typedefs.h       |   1 -
 io/channel-socket.c           |   1 +
 migration/migration.c         | 133 +++++++++++++++++++++++++++++++-----------
 migration/postcopy-ram.c      |   1 -
 migration/qemu-file-channel.c |   9 +++
 migration/trace-events        |   4 +-
 9 files changed, 140 insertions(+), 41 deletions(-)
Signature · 1 line
2.7.4