From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTViG-0005vC-C0 for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:16:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTViA-0005kT-7T for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:16:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVi9-0005kN-Tl for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:16:38 -0400 Message-ID: <53356810.8020206@redhat.com> Date: Fri, 28 Mar 2014 13:16:16 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1395666264-12060-1-git-send-email-arei.gonglei@huawei.com> <5330537E.7060001@redhat.com> <533056A3.5030300@redhat.com> <33183CC9F5247A488A2544077AF19020815DBCE6@SZXEMA503-MBS.china.huawei.com> <533540CD.7040801@redhat.com> <20140328113001.GB2450@work-vm> In-Reply-To: <20140328113001.GB2450@work-vm> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] migration: Fix possible bug for migrate cancel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: "quintela@redhat.com" , "libvir-list@redhat.com" , Yanqiangjun , "qemu-devel@nongnu.org" , "Zhaoyanbin (A)" , Zengjunliang , "Gonglei (Arei)" Il 28/03/2014 12:30, Dr. David Alan Gilbert ha scritto: >> > Another reason for doing it in libvirt is that the serialization >> > between cancellation and completion of migration ultimately is >> > controlled by libvirt's lock. Doing this in QEMU makes it harder to >> > reason about concurrency. > I think you have to be careful when you talk about 'cancellation and completion > of migration' - in that paragraph I don't think you mean the same thing > as MIG_STATE_CANCELLED and MIG_STATE_COMPLETED, I think you're talking > about the larger scale idea of completion after you take into account > that the VM might be paused after qemu has gone to MIG_STATE_COMPLETED and > libvirt might still decide it wants to give up and use the version on > the source that's still paused. Yes, exactly. This is why I considered the possibility of adding a "cancelled" flag within libvirt. Libvirt always uses -S on the destination, so it's always possible to cancel migration even after MIG_STATE_COMPLETED. Paolo