From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr9Ol-0007wu-2d for qemu-devel@nongnu.org; Wed, 19 Nov 2014 12:50:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr9Og-0005lP-F0 for qemu-devel@nongnu.org; Wed, 19 Nov 2014 12:50:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr9Og-0005lH-5K for qemu-devel@nongnu.org; Wed, 19 Nov 2014 12:50:30 -0500 Date: Wed, 19 Nov 2014 17:50:11 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20141119175010.GN2355@work-vm> References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-20-git-send-email-dgilbert@redhat.com> <20141103050819.GP8949@voom.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141103050819.GP8949@voom.redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, cristian.klein@cs.umu.se, qemu-devel@nongnu.org, amit.shah@redhat.com, yanghy@cn.fujitsu.com * David Gibson (david@gibson.dropbear.id.au) wrote: > On Fri, Oct 03, 2014 at 06:47:25PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Postcopy needs to have two migration streams loading concurrently; > > one from memory (with the device state) and the other from the fd > > with the memory transactions. > > > > Split the core of qemu_loadvm_state out so we can use it for both. > > > > Allow the inner loadvm loop to quit and signal whether the parent > > should. > > > > loadvm_handlers is made static since it's lifetime is greater > > than the outer qemu_loadvm_state. > > Maybe it's just me, but "made static" to me indicates either a change > from fully-global to module-global, or (function) local automatic to > local static, not a change from function local-automatic to > module-global as here. > > It's also not clear from this patch alone why the lifetime of > loadvm_handlers now needs to exceed that of qemu_loadvm_state(). OK, how about if I reworked that last sentence to be: loadvm_handlers is made module-global to survive beyond the lifetime of the outer qemu_loadvm_state since it may still be in use by a subloop in the postcopy listen thread. Dave > > -- > David Gibson | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ > | _way_ _around_! > http://www.ozlabs.org/~dgibson -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK