From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqbY3-0000OI-GA for qemu-devel@nongnu.org; Tue, 18 Nov 2014 00:41:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqbXx-0005cS-67 for qemu-devel@nongnu.org; Tue, 18 Nov 2014 00:41:55 -0500 Received: from ozlabs.org ([103.22.144.67]:33222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqbXw-0005bO-Ra for qemu-devel@nongnu.org; Tue, 18 Nov 2014 00:41:49 -0500 Date: Tue, 18 Nov 2014 15:36:43 +1100 From: David Gibson Message-ID: <20141118043643.GE2867@voom.redhat.com> References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-23-git-send-email-dgilbert@redhat.com> <20141104012815.GC27321@voom.fritz.box> <20141104101915.GE25183@work-vm> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PGNNI9BzQDUtgA2J" Content-Disposition: inline In-Reply-To: <20141104101915.GE25183@work-vm> 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: "Dr. David Alan Gilbert" 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 --PGNNI9BzQDUtgA2J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 04, 2014 at 10:19:15AM +0000, Dr. David Alan Gilbert wrote: > * 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" > > >=20 > > > 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. > > >=20 > > > This is used by postcopy to load device state (from the package) > > > while loading memory pages from the main stream. > > >=20 > > > Signed-off-by: Dr. David Alan Gilbert > >=20 > > Reviewed-by: David Gibson > >=20 > > Though one minor comment: > >=20 > > [snip] > > > +/* We have a buffer of data to send; we don't want that all to be lo= aded > > > + * 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 > >=20 > > I'm not quite understanding what that comment's getting at. >=20 > We have these VM Commands; and they are a command type, and a length: > CMD_whatever > length: whatever > data for whatever >=20 > This comment is describing that, to make things easier for this code it's > ended up as: >=20 > CMD_PACKAGED > CMD length: 4 <--- i.e. just enough to hold the next 'length' fie= ld > package length > --------------- > The package >=20 > Which is a little different, hence i thought it needed the comment. Ah.. right. That seems.. gratuitously easy to get wrong further down the track. Why not just use the cmd length as the package length. --=20 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 --PGNNI9BzQDUtgA2J Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUaszbAAoJEGw4ysog2bOSkIQP/3rCK+3URprV46vseV7NRnhd qcjZD5fiKpx+hh7KAbv7ggpxksjvhQnDhmXTo3xU49vR3CsyeTGb7Wd6IvvwEv66 jq+rONzmpo0Nlf6blA2bswh0JphznCYGJSe+GB5e/L8y/+/QaLEUEOa9vxctr91C ZHPjmSF7eJdGOzipLY8LVk9+X2XpabTstUOtIULJCXRvWWPNa0XXKR3uA48+e7CL /THj3l9yO8jvYn/dW45mfXUeQOSVNvhsjUMuHS+G7oCnjPTz0i5JmV5wHrRhtfG/ GWCz1fzEFU9GTlv7a2hgykoouv6D0Tdyo/qy8e1jjtbJtVDGcGdA/ArIhbK1tCkv bDoPtby9JOoYCaJ2aYytEPdGDB6admTWQU5QoVvptHs6VD0IednH7o7mJaFyBRY+ pfsfQJ8ZF13S/3lR+SO0O9ab3BEMNjcXSV5koY+X9XMtYnJfsUFGKi2Z4QXsKIvT sRuBOfd7jKH2T3T8emuYqYwUkDdDUdtpEunmtBtOOfFtzYTZDKsvzK/p+C+L6042 0zXtM/X1sKoNln2qCU3L+kR6l0ms+/wI66j8DYnDc8uYJtSP9sE7SZGwDPnjmdoQ 9wS4FRHKfuRiqw6bzCTg43wWtix7BwdwJLp/VB28uI4u69jES/kEdLtS/bXwlJSn Uo2ojR48+o7rirsbP6AZ =Zd/K -----END PGP SIGNATURE----- --PGNNI9BzQDUtgA2J--