From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: domain creation vs querying free memory (xend and xl) Date: Fri, 28 Sep 2012 18:08:03 +0200 Message-ID: <1348848483.3153.23.camel@Abyss> References: <53b8c758-2675-42a7-b63f-4f9ad0006d84@default> <50646FBF.9000501@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0566294968547215967==" Return-path: In-Reply-To: <50646FBF.9000501@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Shuklin Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============0566294968547215967== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-HRi2zSrxLSIwtxRaohyp" --=-HRi2zSrxLSIwtxRaohyp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2012-09-27 at 19:24 +0400, George Shuklin wrote:=20 > not sure about xl/xm, but xapi performs one start at time, so there is= =20 > no race between domains for memory or other resources. >=20 IIRC, xl has a vary coarse grain locking mechanism in place for domain creation too. As a result of that, you shouldn't be able to create two domains at the same time, which should be enough for preventing the situation described in the original e-mail for occurring. Looking at acquire_lock() and release_lock() (and at where they are called) in xl code should clarify whether or not that is enough to actually avoid the race (which I think it is, but I might be wrong :-D). That being said, there still is the room for races, although not wrt domain creation, as, for instance, there isn't any synchronization between creation and ballooning, which both manipulate memory. So, maybe thinking about some kind of reservation-based/transactional mechanism at some level might make actual sense. Unfortunately, I've no idea about how xm works in that respect. Hope this at least help clarifying the situation a bit. :-) Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-HRi2zSrxLSIwtxRaohyp 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.12 (GNU/Linux) iEYEABECAAYFAlBly2MACgkQk4XaBE3IOsTKgACfeejc+RdRhhGR3uW1HDQVY4Gm krgAnjGBp2Es8sRvCH2T6JGx+ddWbjdV =QcG8 -----END PGP SIGNATURE----- --=-HRi2zSrxLSIwtxRaohyp-- --===============0566294968547215967== 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 --===============0566294968547215967==--