[PATCH 0/5] migration: Fix disorder of channel creations

Peter Xu posted 5 patches 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221213213850.1481858-1-peterx@redhat.com
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Fam Zheng <fam@euphon.net>, Stefan Berger <stefanb@linux.vnet.ibm.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Coiby Xu <Coiby.Xu@gmail.com>
There is a newer version of this series
chardev/char-socket.c               |   4 +-
include/io/channel.h                |   6 +
io/channel-buffer.c                 |   1 +
io/channel-command.c                |   1 +
io/channel-file.c                   |   1 +
io/channel-null.c                   |   1 +
io/channel-socket.c                 |  17 ++-
io/channel-tls.c                    |   1 +
io/channel-websock.c                |   1 +
io/channel.c                        |  16 ++-
migration/channel-block.c           |   1 +
migration/channel.c                 |  45 ++++++++
migration/channel.h                 |   5 +
migration/migration.c               | 164 +++++++++++++++++++---------
migration/migration.h               |  15 ++-
migration/multifd.c                 |  24 +---
migration/multifd.h                 |   2 +-
migration/postcopy-ram.c            |  36 +++---
migration/postcopy-ram.h            |   6 +-
migration/rdma.c                    |   1 +
migration/savevm.c                  |   6 +-
scsi/qemu-pr-helper.c               |   2 +-
tests/qtest/tpm-emu.c               |   2 +-
tests/unit/test-io-channel-socket.c |   1 +
util/vhost-user-server.c            |   2 +-
25 files changed, 254 insertions(+), 107 deletions(-)
[PATCH 0/5] migration: Fix disorder of channel creations
Posted by Peter Xu 1 year, 4 months ago
Based-on: <20221011215559.602584-1-peterx@redhat.com>

This whole set is based on the whole set of preempt-full mode being applied
first here:

https://lore.kernel.org/r/20221011215559.602584-1-peterx@redhat.com

I also picked up the latest version from Manish on fixing multifd
counterpart of the problem, here (which are the initial two patches):

https://lore.kernel.org/r/20221123172735.25181-1-manish.mishra@nutanix.com

One trivial change is to fix RDMA builds for patch 1 there.

I verified that I can trigger disordered connections with preempt mode
postcopy (1 out of a few attemps), which can cause migration to hang during
precopy phase, if e.g. I set the NIC packet loss rate to 50%.  So now with
all the 5 patches applied we should fix all the migration disorder issue on
channel creation.

Patch 3 is IMHO a cleanup that I'd think good to have even without patch
4/5.  Patch 5 actually fixes the ordering issue.  For each of the patch,
please refer to the commit message and comments in-code.  Any comment
welcomed.

A side note to Juan: logically it should apply cleanly to your -next tree
as long as Manish's patches are not there - because they're also included
here with a fix to RDMA builds.

Peter Xu (3):
  migration: Rework multi-channel checks on URI
  migration: Add a semaphore to count PONGs
  migration: Postpone postcopy preempt channel to be after main

manish.mishra (2):
  io: Add support for MSG_PEEK for socket channel
  migration: check magic value for deciding the mapping of channels

 chardev/char-socket.c               |   4 +-
 include/io/channel.h                |   6 +
 io/channel-buffer.c                 |   1 +
 io/channel-command.c                |   1 +
 io/channel-file.c                   |   1 +
 io/channel-null.c                   |   1 +
 io/channel-socket.c                 |  17 ++-
 io/channel-tls.c                    |   1 +
 io/channel-websock.c                |   1 +
 io/channel.c                        |  16 ++-
 migration/channel-block.c           |   1 +
 migration/channel.c                 |  45 ++++++++
 migration/channel.h                 |   5 +
 migration/migration.c               | 164 +++++++++++++++++++---------
 migration/migration.h               |  15 ++-
 migration/multifd.c                 |  24 +---
 migration/multifd.h                 |   2 +-
 migration/postcopy-ram.c            |  36 +++---
 migration/postcopy-ram.h            |   6 +-
 migration/rdma.c                    |   1 +
 migration/savevm.c                  |   6 +-
 scsi/qemu-pr-helper.c               |   2 +-
 tests/qtest/tpm-emu.c               |   2 +-
 tests/unit/test-io-channel-socket.c |   1 +
 util/vhost-user-server.c            |   2 +-
 25 files changed, 254 insertions(+), 107 deletions(-)

-- 
2.37.3