From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZsFv-0001iA-86 for qemu-devel@nongnu.org; Sun, 22 Mar 2015 22:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZsFq-0003zP-V0 for qemu-devel@nongnu.org; Sun, 22 Mar 2015 22:38:19 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:43482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZsFq-0003z3-Ir for qemu-devel@nongnu.org; Sun, 22 Mar 2015 22:38:14 -0400 Date: Mon, 23 Mar 2015 13:25:42 +1100 From: David Gibson Message-ID: <20150323022542.GG25043@voom.fritz.box> References: <1424883128-9841-1-git-send-email-dgilbert@redhat.com> <1424883128-9841-21-git-send-email-dgilbert@redhat.com> <20150313010058.GZ11973@voom.redhat.com> <20150313101953.GA2486@work-vm> <20150316061840.GE5741@voom.redhat.com> <20150320123759.GE2468@work-vm> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rV8arf8D5Dod9UkK" Content-Disposition: inline In-Reply-To: <20150320123759.GE2468@work-vm> Subject: Re: [Qemu-devel] [PATCH v5 20/45] Modify savevm handlers for postcopy 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, qemu-devel@nongnu.org, amit.shah@redhat.com, pbonzini@redhat.com, yanghy@cn.fujitsu.com --rV8arf8D5Dod9UkK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 20, 2015 at 12:37:59PM +0000, Dr. David Alan Gilbert wrote: > * David Gibson (david@gibson.dropbear.id.au) wrote: > > On Fri, Mar 13, 2015 at 10:19:54AM +0000, Dr. David Alan Gilbert wrote: > > > * David Gibson (david@gibson.dropbear.id.au) wrote: > > > > On Wed, Feb 25, 2015 at 04:51:43PM +0000, Dr. David Alan Gilbert (g= it) wrote: > > > > > From: "Dr. David Alan Gilbert" > > > > >=20 > > > > > Modify save_live_pending to return separate postcopiable and > > > > > non-postcopiable counts. > > > > >=20 > > > > > Add 'can_postcopy' to allow a device to state if it can postcopy > > > >=20 > > > > What's the purpose of the can_postcopy callback? There are no call= ers > > > > in this patch - is it still necessary with the change to > > > > save_live_pending? > > >=20 > > > The patch 'qemu_savevm_state_complete: Postcopy changes' uses > > > it in qemu_savevm_state_postcopy_complete and qemu_savevm_state_compl= ete > > > to decide which devices must be completed at that point. > >=20 > > Couldn't they check for non-zero postcopiable state from > > save_live_pending instead? >=20 > That would be a bit weird. >=20 > At the moment for each device we call the: > save_live_setup method (from qemu_savevm_state_begin) >=20 > 0...multiple times we call: > save_live_pending > save_live_iterate >=20 > and then we always call > save_live_complete >=20 >=20 > To my mind we have to call save_live_complete for any device > that we've called save_live_setup on (maybe it allocated something > in _setup that it clears up in _complete). >=20 > save_live_pending could perfectly well return 0 remaining at the end of > the migrate for our device, and thus if we used that then we wouldn't > call save_live_complete. Um.. I don't follow. I was suggesting that at the precopy->postcopy transition point you call save_live_complete for everything that reports 0 post-copiable state. Then again, a different approach would be to split the save_live_complete hook into (possibly NULL) "complete precopy" and "complete postcopy" hooks. The core would ensure that every chunk of state has both completion hooks called (unless NULL). That might also address my concerns about the no longer entirely accurate save_live_complete function name. --=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 --rV8arf8D5Dod9UkK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVD3mmAAoJEGw4ysog2bOSb+sP/3o9lb92SwG4dWenThkHKhjF qfVZwKDrV9eoqqxPNCJ3ZyR4cD20Q/LMVHxpHCBEC3+0D8/u+UJIJeXz/OwHQTAF dh8M9NO989Nu13nS4D9cwMXMRwILQoCUJ0cVTYalEQnvi1O9LWCnBn2g6vZiMro2 I/0aQIpHW60rtBCAY1qPHSB75a6JMPutY6LIpbK5DCBdMWp2tNY1ropayy6aaDGz pTlMWz8n2Jt6uelyV7EwtDel/dj+9x3UponaCDn1LNWAoohk6T2J4B8xOcIbDfnk ST/w/2F1oF4/zvfLhoN4nZSLGzsvw3iecyoua7Pa5ta4EpwMdeNFgOH+ucomJj94 d3pW1KkUxnbS6Axo+eZcVMJkph8IJkN5UkExz7hIIMpbOIrhVOHRZcSFdg2x0CE2 KiFLOAmWoEk5dT5+6sN3ymkPQID6VG7kvHki75PBVfsPxzpoeUyam9cUZGxo1gVs kzPdyFBkuYjRWe0R27EAIhz5x84KGWnkJ06XO9+MfqUFB4Q5zygsiEP7kZFMk1Uo 7et6cLqKa+M0aymbGiOKIpJuHPNSFNK3OJGYxTVtP4u8m2lFGvYkDHsghl+HEui7 bFWIqUQHYPBBXEdu+ZXRiWd+96oSRYLSDLnoVfVQ4Dqffm4RUISJ3id3x752Vt3S LLbASO65tpvFcyjmf0J2 =ua71 -----END PGP SIGNATURE----- --rV8arf8D5Dod9UkK--