From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlbD6-0007Gg-T3 for qemu-devel@nongnu.org; Tue, 04 Nov 2014 05:19:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlbD2-0002dV-QF for qemu-devel@nongnu.org; Tue, 04 Nov 2014 05:19:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlbD2-0002dE-Hy for qemu-devel@nongnu.org; Tue, 04 Nov 2014 05:19:32 -0500 Date: Tue, 4 Nov 2014 10:19:15 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20141104101915.GE25183@work-vm> References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-23-git-send-email-dgilbert@redhat.com> <20141104012815.GC27321@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141104012815.GC27321@voom.fritz.box> Subject: Re: [Qemu-devel] [PATCH v4 22/47] QEMU_VM_CMD_PACKAGED: Send a packaged chunk of migration stream 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:28PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > QEMU_VM_CMD_PACKAGED is a migration command that allows a chunk > > of migration stream to be sent in one go, and be received by > > a separate instance of the loadvm loop while not interacting > > with the migration stream. > > > > This is used by postcopy to load device state (from the package) > > while loading memory pages from the main stream. > > > > Signed-off-by: Dr. David Alan Gilbert > > Reviewed-by: David Gibson > > Though one minor comment: > > [snip] > > +/* We have a buffer of data to send; we don't want that all to be loaded > > + * by the command itself, so the command contains just the length of the > > + * extra buffer that we then send straight after it. > > + * TODO: Must be a better way to organise that > > I'm not quite understanding what that comment's getting at. We have these VM Commands; and they are a command type, and a length: CMD_whatever length: whatever data for whatever This comment is describing that, to make things easier for this code it's ended up as: CMD_PACKAGED CMD length: 4 <--- i.e. just enough to hold the next 'length' field package length --------------- The package Which is a little different, hence i thought it needed the comment. 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