From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqlJp-0002ov-Ra for qemu-devel@nongnu.org; Mon, 26 Oct 2015 13:12:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqlJk-0003dp-TA for qemu-devel@nongnu.org; Mon, 26 Oct 2015 13:12:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqlJk-0003dT-Nd for qemu-devel@nongnu.org; Mon, 26 Oct 2015 13:12:20 -0400 Date: Mon, 26 Oct 2015 17:12:15 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20151026171215.GG2500@work-vm> References: <1443515898-3594-1-git-send-email-dgilbert@redhat.com> <1443515898-3594-36-git-send-email-dgilbert@redhat.com> <878u6wbnu7.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878u6wbnu7.fsf@neno.neno> Subject: Re: [Qemu-devel] [PATCH v8 35/54] Postcopy: Postcopy startup in migration thread List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela 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 * Juan Quintela (quintela@redhat.com) wrote: > "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:-) Changed. > 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 :-( Yeh, it seemed simpler to have a nice simple bool. > Reviewed-by: Juan Quintela > > > Split only or rename variable just if you consider it convenient. Renamed, not split. Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK