From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Bv1-0006yK-El for qemu-devel@nongnu.org; Thu, 08 Jan 2015 07:10:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9Bux-0001dX-J6 for qemu-devel@nongnu.org; Thu, 08 Jan 2015 07:10:27 -0500 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:52880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Bux-0001dR-CK for qemu-devel@nongnu.org; Thu, 08 Jan 2015 07:10:23 -0500 Received: by mail-wi0-f178.google.com with SMTP id em10so2821573wid.5 for ; Thu, 08 Jan 2015 04:10:22 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54AE73AA.7060408@redhat.com> Date: Thu, 08 Jan 2015 13:10:18 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1420715492-5109-1-git-send-email-dgilbert@redhat.com> In-Reply-To: <1420715492-5109-1-git-send-email-dgilbert@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/3] Migration cancel with dead network List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org Cc: amit.shah@redhat.com, cristian.klein@cs.umu.se, quintela@redhat.com On 08/01/2015 12:11, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > 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. A more precise commit message for 2/3 would be nice, but the code is good. Reviewed-by: Paolo Bonzini