From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbShE-0003Wy-Dv for qemu-devel@nongnu.org; Tue, 07 Oct 2014 07:12:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbSh7-0004MN-J0 for qemu-devel@nongnu.org; Tue, 07 Oct 2014 07:12:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbSh7-0004MI-B3 for qemu-devel@nongnu.org; Tue, 07 Oct 2014 07:12:41 -0400 Message-ID: <5433CA9D.6060000@redhat.com> Date: Tue, 07 Oct 2014 13:12:29 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-48-git-send-email-dgilbert@redhat.com> <54303CEF.6060606@redhat.com> <20141007102937.GG2404@work-vm> In-Reply-To: <20141007102937.GG2404@work-vm> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 47/47] End of migration for postcopy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com, cristian.klein@cs.umu.se, qemu-devel@nongnu.org, amit.shah@redhat.com, yanghy@cn.fujitsu.com Il 07/10/2014 12:29, Dr. David Alan Gilbert ha scritto: > You mean something like this (untested) ? > > if (mis->postcopy_ram_state != POSTCOPY_RAM_INCOMING_NONE) { > if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) { > /* > * Where a migration had postcopy enabled (and thus went to advise) > * but managed to complete within the precopy period > */ > postcopy_ram_incoming_cleanup(mis); > } else if (ret >= 0) { > /* > * Postcopy was started, cleanup should happen at the end of the > * postcopy thread. > */ > DPRINTF("process_incoming_migration_co: exiting main branch"); > return; > } > } Yes. Not sure why postcopy_ram_incoming_cleanup is not needed if ret < 0, but you sure know. :) Of course, this is subject to my previous comment that I would rename a lot of postcopy_ram_* symbols to just postcopy_*. Paolo