From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaDfc-0004bJ-QU for qemu-devel@nongnu.org; Mon, 23 Mar 2015 21:30:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaDfb-0006RD-7R for qemu-devel@nongnu.org; Mon, 23 Mar 2015 21:30:16 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:35484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaDfa-0006QU-SD for qemu-devel@nongnu.org; Mon, 23 Mar 2015 21:30:15 -0400 Date: Tue, 24 Mar 2015 12:25:13 +1100 From: David Gibson Message-ID: <20150324012513.GW25043@voom.fritz.box> References: <1424883128-9841-1-git-send-email-dgilbert@redhat.com> <1424883128-9841-46-git-send-email-dgilbert@redhat.com> <20150323043209.GO25043@voom.fritz.box> <20150323122150.GE2368@work-vm> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i/VKSWANvDZSIhsB" Content-Disposition: inline In-Reply-To: <20150323122150.GE2368@work-vm> Subject: Re: [Qemu-devel] [PATCH v5 45/45] Inhibit ballooning during 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 --i/VKSWANvDZSIhsB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 23, 2015 at 12:21:50PM +0000, Dr. David Alan Gilbert wrote: > * David Gibson (david@gibson.dropbear.id.au) wrote: > > On Wed, Feb 25, 2015 at 04:52:08PM +0000, Dr. David Alan Gilbert (git) = wrote: > > > From: "Dr. David Alan Gilbert" > > >=20 > > > The userfault mechanism used for postcopy generates faults > > > for us on pages that are 'not present', inflating a balloon in > > > the guest causes host pages to be marked as 'not present'; doing > > > this during a postcopy, as potentially the same pages were being > > > received from the source, would confuse the state of the received > > > page -> disable ballooning during postcopy. > >=20 > > That is a ludicrously long sentence, which I have great difficulty pars= ing. >=20 > OK, how about: >=20 > ----- > Postcopy detects accesses to pages that haven't been transferred yet > using userfaultfd, and it causes exceptions on pages that are 'not presen= t'. > Ballooning also causes pages to be marked as 'not present' when the guest > inflates the balloon. > Potentially a balloon could be inflated to discard pages that are current= ly > inflight during postcopy and that may be arriving at about the same time. >=20 > To avoid this confusion, disable ballooning during postcopy. Better, thanks. > ----- >=20 > > > When disabled we drop balloon requests from the guest. Since balloon= ing > > > is generally initiated by the host, the management system should avoid > > > initiating any balloon instructions to the guest during migration, > > > although it's not possible to know how long it would take a guest to > > > process a request made prior to the start of migration. > >=20 > > Yeah :/. It would be nice if it could queue the guest actions, > > instead of dropping them. >=20 > Yes, I did look at that briefly; it's not trivial; for > example consider the situation where the guest discards some pages > by inflating, and then later deflates, it expects to lose that data > but then starts accessing that physical page again. =20 > If you replay that sequence at the end then you've lost newly accessed pa= ges. > So you have to filter out inflates that have been deflated later, > and have to order those correctly with the sense of changes made to those > pages after the deflation occurs. Ah, yes, I see. --=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 --i/VKSWANvDZSIhsB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVELz5AAoJEGw4ysog2bOSEXkP/iOpalBa/tvoTdK3+n3QVRD1 vj4pa55XTE303gmCbKdIe6gqSaMJk0Wr9l/aEZid1HV6LoNWu5ev/38AShAlLdgv 3rf4a4wWZqCAGtD3l8sWQb9BZm47d0s3irreZADKhPjrvnQNnSqnZXRx2SZMcTCo nxh5GZ4yk3XyEAqPZny1opEtXTbszTXWS7DxXg9gU80N/mNJRKHJxE/wWHUbAUns KUfA0CRthtxViO7RjK08OUVxgi0iIjKhv6NsLcBoNiU4EeMzKzULSWpXFh4ap5NR nnRoPWKflIe+QeassJ9MUhBpX+H8k813UxYfJ2wazri2r8J2ixaJmH6z3GTI8AhY bkF0DwTY+DfjuSJwUu08JQ9+d4yyGgpW6Y5gl8scrl8ofq1akz0wYBINqobL8z9D k3V4/ToVfIciRREqvRt83hjGDiVENIFfkSG8DG6Kjh2Q4C1Ln3z/uO661bAYrrSA 79f0OD4j/P2ObGGkMuTyR9W4VyuuWBAyCAu7/xsNVNbm3gMliHZ5GsTclg5MZKA2 7vMHQ6Awh5yR7tw9nQHpeePhhjoGIxffbWVNDUhsC+K3G45S6e06O4OJB2pK0wyE rLFp7zI0J5jLKbTIiRlUm4fCoNRGSUmkvhaXaiGt6p9RGoYnEMIYqYSzQuSQdvDG ljJzfRKDiFiYTpc/kVCI =tmDy -----END PGP SIGNATURE----- --i/VKSWANvDZSIhsB--