Received: from eggs.gnu.org ([2001:4830:134:3::10]:54711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZopDh-0006Kt-Cr for qemu-devel@nongnu.org; Wed, 21 Oct 2015 04:58:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZopDX-0001YU-5O for qemu-devel@nongnu.org; Wed, 21 Oct 2015 04:58:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZopDW-0001YN-Vy for qemu-devel@nongnu.org; Wed, 21 Oct 2015 04:57:55 -0400 From: Juan Quintela In-Reply-To: <1443515898-3594-36-git-send-email-dgilbert@redhat.com> (David Alan Gilbert's message of "Tue, 29 Sep 2015 09:37:59 +0100") References: <1443515898-3594-1-git-send-email-dgilbert@redhat.com> <1443515898-3594-36-git-send-email-dgilbert@redhat.com> Date: Wed, 21 Oct 2015 10:57:52 +0200 Message-ID: <878u6wbnu7.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v8 35/54] Postcopy: Postcopy startup in migration thread Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: aarcange@redhat.com, liang.z.li@intel.com, qemu-devel@nongnu.org, luis@cs.umu.se, bharata@linux.vnet.ibm.com, amit.shah@redhat.com, pbonzini@redhat.com "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Rework the migration thread to setup and start postcopy. > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: Amit Shah > diff --git a/include/migration/migration.h b/include/migration/migration.h > index aecf284..0586f8c 100644 > --- a/include/migration/migration.h > +++ b/include/migration/migration.h > @@ -136,6 +136,9 @@ struct MigrationState > /* Flag set once the migration has been asked to enter postcopy */ > bool start_postcopy; > > + /* Flag set once the migration thread is running (and needs joining) */ > + bool migration_thread_started; > + > /* bitmap of pages that have been sent at least once > * only maintained and used in postcopy at the moment > * where it's used to send the dirtymap at the start if you split it, we can already integrate the migration_thread_started. I would suggest to change the name to migration_thread_running, but you are the native one here O:-) If you don't want to add this variable, I *think* we could use MIGRATION_STATE_NONE with just some little rearangements of the code. On the other hand, it could be racy :-( Reviewed-by: Juan Quintela Split only or rename variable just if you consider it convenient.