qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Migration cancel with dead network
@ 2015-01-08 11:11 Dr. David Alan Gilbert (git)
  2015-01-08 11:11 ` [Qemu-devel] [PATCH 1/3] socket shutdown Dr. David Alan Gilbert (git)
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2015-01-08 11:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: amit.shah, cristian.klein, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

If the remote host, or networking dies during a migration, the socket can be
waiting for a long timeout, and migration_cancel can't complete the cancel
for a long time (and you can't start a new one to somewhere else).
(Where 'long' is the TCP timeout, that's ~15 mins)

This patch set uses the shutdown(2) syscall to unblock any write/sends that
are in progress to let the migrate_cancel happen quickly.

  1/3: socket shutdown  - An updated patch from my postcopy world to
                          add a shut_down method on QEMUFile - only
                          for 'socket' (where the syscall is supported).

  2/3: Handle bi-directional communication for fd migration
                        - A patch from Cristian Klein to use the socket
                          QEMUFile for FDs that are passed in, if the FDs
                          are sockets; this is needed so that libvirt
                          migrations can take advantage of the other patches.
                          Again this patch (and its naming) come from the
                          postcopy world.

  3/3: migration_cancel: shutdown migration socket
                        - A new patch that uses the shutdown in migrate_fd_cancel


Note this does not fix the timeout if you try to migrate to an already dead host;
the connect timeout is typically a much shorter 2 minutes anyway.

Dave

Cristian Klein (1):
  Handle bi-directional communication for fd migration

Dr. David Alan Gilbert (2):
  socket shutdown
  migration_cancel: shutdown migration socket

 include/migration/qemu-file.h | 10 ++++++++++
 include/qemu/sockets.h        |  7 +++++++
 migration/fd.c                | 24 ++++++++++++++++++++++--
 migration/migration.c         | 12 ++++++++++++
 migration/qemu-file-unix.c    | 23 +++++++++++++++++++----
 migration/qemu-file.c         | 12 ++++++++++++
 6 files changed, 82 insertions(+), 6 deletions(-)

-- 
2.1.0

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

end of thread, other threads:[~2015-01-09  6:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08 11:11 [Qemu-devel] [PATCH 0/3] Migration cancel with dead network Dr. David Alan Gilbert (git)
2015-01-08 11:11 ` [Qemu-devel] [PATCH 1/3] socket shutdown Dr. David Alan Gilbert (git)
2015-01-09  6:50   ` Amit Shah
2015-01-08 11:11 ` [Qemu-devel] [PATCH 2/3] Handle bi-directional communication for fd migration Dr. David Alan Gilbert (git)
2015-01-08 11:11 ` [Qemu-devel] [PATCH 3/3] migration_cancel: shutdown migration socket Dr. David Alan Gilbert (git)
2015-01-08 11:22 ` [Qemu-devel] [PATCH 0/3] Migration cancel with dead network Daniel P. Berrange
2015-01-08 11:29   ` Dr. David Alan Gilbert
2015-01-08 11:33     ` Daniel P. Berrange
2015-01-08 12:10 ` Paolo Bonzini
2015-01-09  6:50 ` Amit Shah

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