From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaU75-0000OS-05 for qemu-devel@nongnu.org; Sat, 04 Oct 2014 14:31:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaU6v-0005ZH-Up for qemu-devel@nongnu.org; Sat, 04 Oct 2014 14:31:26 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:60126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaU6v-0005ZD-NG for qemu-devel@nongnu.org; Sat, 04 Oct 2014 14:31:17 -0400 Received: by mail-wi0-f170.google.com with SMTP id hi2so3834191wib.1 for ; Sat, 04 Oct 2014 11:31:16 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <54303CEF.6060606@redhat.com> Date: Sat, 04 Oct 2014 20:31:11 +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> In-Reply-To: <1412358473-31398-48-git-send-email-dgilbert@redhat.com> 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 (git)" , qemu-devel@nongnu.org Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com, cristian.klein@cs.umu.se, amit.shah@redhat.com, yanghy@cn.fujitsu.com Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > + mis->postcopy_ram_state); > + 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) && > + (mis->postcopy_ram_state > POSTCOPY_RAM_INCOMING_ADVISE)) { Instead of the >, it is perhaps nicer to use an outer if that checks for state != NONE? Because in fact this check is for state != NONE, having ADVISE been handled above. Paolo > + /* > + * Postcopy was started, cleanup should happen at the end of the > + * postcopy thread. > + */ > + DPRINTF("process_incoming_migration_co: exiting main branch"); > + return; > + } > + }