From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH v2 3/3] tools/libxc: use superpages during restore of HVM guest Date: Wed, 23 Aug 2017 15:44:30 +0200 Message-ID: <20170823134430.GD6372@aepfle.de> References: <20170817170133.30939-1-olaf@aepfle.de> <20170817170133.30939-4-olaf@aepfle.de> <20170822153116.xi6tcqumodcxmrfd@citrix.com> <20170822155325.GA6372@aepfle.de> <20170823103339.pl3fq7bh46awiuwu@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6634121963326384899==" Return-path: In-Reply-To: <20170823103339.pl3fq7bh46awiuwu@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Wei Liu Cc: Andrew Cooper , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============6634121963326384899== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PGNNI9BzQDUtgA2J" Content-Disposition: inline --PGNNI9BzQDUtgA2J Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Wed, Aug 23, Wei Liu wrote: > On Tue, Aug 22, 2017 at 05:53:25PM +0200, Olaf Hering wrote: > > In my testing I have seen the case of over-allocation. Thats why I > > implemented the freeing of unpopulated parts. It would be nice to know > > how many pages are actually coming. I think this info is not available. > Not sure I follow. What do you mean by "how many pages are actually > coming"? This meant the expected number of pages to populate. The value of p2m_size does not represent the actual number of pages assigned to a domU. This info is stored in getdomaininfo.max_pages, which is currently not used by restore. I will see if using this value will avoid triggering the Over-allocation check. > > On the other side, the first iteration sends the pfns linear. This is > > when the allocation actually happens. So the over-allocation will only > > trigger near the end, if a 1G range is allocated but only a few pages > > will be stored into this range. > This could be making too many assumptions on the data stream. With the usage of max_pages some assumptions can be avoided. Olaf --PGNNI9BzQDUtgA2J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSkRyP6Rn//f03pRUBdQqD6ppg2fgUCWZ2GugAKCRBdQqD6ppg2 fjg/AKCcH9vuDKdY8MXKvfvPiUaPoMOTkQCfTiOhkloIi1dmzsP98S3zwgkTy0s= =lr+I -----END PGP SIGNATURE----- --PGNNI9BzQDUtgA2J-- --===============6634121963326384899== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6634121963326384899==--