From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Marczykowski Subject: Re: [libvirt] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup Date: Thu, 11 Apr 2013 12:53:00 +0200 Message-ID: <5166960C.9060008@invisiblethingslab.com> References: <233f44eb964cb337a0e48611bc72edfc74fbf7eb.1365561883.git.marmarek@invisiblethingslab.com> <51663786.9060908@suse.com> <1365666725.27868.118.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8256880375885921343==" Return-path: In-Reply-To: <1365666725.27868.118.camel@zakaz.uk.xensource.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: Ian Campbell Cc: Jim Fehlig , "libvirt-list@redhat.com" , xen-devel List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============8256880375885921343== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig73B912A52018C73F03D375AD" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig73B912A52018C73F03D375AD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11.04.2013 09:52, Ian Campbell wrote: > On Thu, 2013-04-11 at 05:09 +0100, Jim Fehlig wrote: >>> + /* This will fill xenstore info about free and dom0 memory - if = missing, >>> + * should be called before starting first domain */ >>> + if (libxl_get_free_memory(libxl_driver->ctx, &free_mem)) { >>> + VIR_ERROR(_("cannot get free memory info")); >>> + goto error; >>> + } >>> =20 >> >> Should failure of libxl_get_free_memory() really be fatal and prevent >> the driver from loading? >=20 > I'm not sure it is intended to be called like this... >=20 > I think it is intended to be called as part of starting every domain, t= o > check if there is enough free memory for that domain, rather than > calling it once at start of day. >=20 > In that context if it fails or returns less than the required amount of= > memory then that would be fatal for starting that domain. >=20 > In xl we use this as part of the auto balloon of dom0, see > xl_cmdimplg.c:freemem. Does libvirt do autoballooning or does it requir= e > dom0_mem? Perhaps this is handled at a higher level? The problem is how libxl set initial value for freemem-slack. If, for any= reason, dom0 hasn't (almost) all memory assigned before creating first do= main, 15% of host memory will no longer be used at all. This "any reason" can b= e dom0_mem, which is covered by "auto" value for autoballoon in xen-unstabl= e (actually only for xl, not libxl in general). But this can also happen if= somebody calls xl set-mem 0 . The later case doesn't mean the= user want to disable autoballoon completely. And to answer you question - libvirt rely on libxl autoballoon. --=20 Best Regards / Pozdrawiam, Marek Marczykowski Invisible Things Lab --------------enig73B912A52018C73F03D375AD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBAgAGBQJRZpYMAAoJENuP0xzK19csguQH+wUpuIeAfyVWulzNAOi5ib9n Y4kN/YIFAPxsEFo09QUpxtkp7DUVn63uw+/+GItka8OQq2zrJV8U9blxBsoqkU/m 5vPZsYsZVbXPnz6wvRZGMrpLUIJdJWUs0o9SFVc35/RMi6Sll7/5R7FEapSg/xB3 G2nqMSR/rdp4xFp5naYIA8GdAZu5JgJggpwt5L82DMsOLbsCd/dmd4bUezu9OwTT pO1wbCtR224KVxoVbtN8UEn5rCVh/DAKwBKRr/1SmGLlZW9F2aK8+a06nfwu+vtF V7VEEML7oPIA+MIoVrang0CKsbB5/unDU4BZdc60tcNcO3kSJ8g4V2mcn1Jn14k= =0mji -----END PGP SIGNATURE----- --------------enig73B912A52018C73F03D375AD-- --===============8256880375885921343== 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 --===============8256880375885921343==--