From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 6 of 8 [RFC]] libxc: introduce xc_domain_move_memory Date: Mon, 6 May 2013 19:29:44 +0200 Message-ID: <1367861384.2958.79.camel@Solace> References: <20130502143209.GL65547@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7984360446527139559==" Return-path: In-Reply-To: <20130502143209.GL65547@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: Dan Magenheimer , Ian Campbell , George Dunlap , Andrew Cooper , Juergen Gross , Olaf Hering , xen-devel , David Vrabel , Keir Fraser , Andres Lagar-Cavilla , Jan Beulich , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org --===============7984360446527139559== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-0iHFsajcECubdPaFvDGL" --=-0iHFsajcECubdPaFvDGL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On gio, 2013-05-02 at 15:32 +0100, Tim Deegan wrote: > Hi, >=20 Hi Tim, Thanks for looking at this! :-) > This looks like a promising start. Two thoughts: >=20 > 1. You currently move memory into a bufferm free it, allocate new memory > and restore the contents. Copying directly from old to new would be > significantly faster, and you could do it for _most_ batches: > - copy old batch 0 to the backup buffer; free old batch 0; > - allocate new batch 1; copy batch 1 directly; free old batch 1; > ... > - allocate new batch n; copy batch n directly; free old batch n; > - allocate new batch 0; copy batch 0 from the backup buffer. >=20 I see what you mean, and I think it's feasible. One thing I noticed (and not yet tracked down properly, actually) is some sort of "latency" in freeing the pages... I'll investigate that better and go for what you suggest if possible. > 2. Clearing all the _PAGE_PRESENT bits with mmu-update > hypercalls must be overkill. It ought to be possible to drop > those pages' typecounts to 0 by unpinning them and then resetting all > the vcpus. The you should be able to just update the contents > with normal writes and re-pin afterwards. >=20 Yeah, I thought the same, but haven't found a sensible way of making that happen yet. However, the 'reset all vcpus' thing definitely needs more attention (and I'm investigating it right in these days). I'll keep digging and let you know what I find. Thanks again, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-0iHFsajcECubdPaFvDGL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iEYEABECAAYFAlGH6IgACgkQk4XaBE3IOsSYHgCeJUX6fLfjG69ni4vFH3qyOnNz 2BMAoJraUUW4W8xoNAI5VzTRpFojQ+p1 =Oi5S -----END PGP SIGNATURE----- --=-0iHFsajcECubdPaFvDGL-- --===============7984360446527139559== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7984360446527139559==--