From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Jim Fehlig <jfehlig@suse.com>,
"libvirt-list@redhat.com" <libvirt-list@redhat.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [libvirt] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup
Date: Thu, 11 Apr 2013 12:53:00 +0200 [thread overview]
Message-ID: <5166960C.9060008@invisiblethingslab.com> (raw)
In-Reply-To: <1365666725.27868.118.camel@zakaz.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 1759 bytes --]
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;
>>> + }
>>>
>>
>> Should failure of libxl_get_free_memory() really be fatal and prevent
>> the driver from loading?
>
> I'm not sure it is intended to be called like this...
>
> I think it is intended to be called as part of starting every domain, to
> check if there is enough free memory for that domain, rather than
> calling it once at start of day.
>
> In that context if it fails or returns less than the required amount of
> memory then that would be fatal for starting that domain.
>
> 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 require
> 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 domain,
15% of host memory will no longer be used at all. This "any reason" can be
dom0_mem, which is covered by "auto" value for autoballoon in xen-unstable
(actually only for xl, not libxl in general). But this can also happen if
somebody calls xl set-mem 0 <some value>. The later case doesn't mean the user
want to disable autoballoon completely.
And to answer you question - libvirt rely on libxl autoballoon.
--
Best Regards / Pozdrawiam,
Marek Marczykowski
Invisible Things Lab
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 553 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-04-11 10:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1365561883.git.marmarek@invisiblethingslab.com>
[not found] ` <233f44eb964cb337a0e48611bc72edfc74fbf7eb.1365561883.git.marmarek@invisiblethingslab.com>
2013-04-11 4:09 ` [libvirt] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup Jim Fehlig
[not found] ` <51663786.9060908@suse.com>
2013-04-11 7:52 ` Ian Campbell
[not found] ` <1365666725.27868.118.camel@zakaz.uk.xensource.com>
2013-04-11 10:53 ` Marek Marczykowski [this message]
2013-04-11 11:00 ` Ian Campbell
2013-04-19 11:10 ` Stefano Stabellini
[not found] ` <alpine.DEB.2.02.1304191201220.7254@kaball.uk.xensource.com>
2013-04-19 11:23 ` Marek Marczykowski
[not found] ` <51712921.5070605@invisiblethingslab.com>
2013-04-19 11:33 ` Stefano Stabellini
2013-05-22 15:05 ` Jim Fehlig
[not found] ` <519CDEC2.80708@suse.com>
2013-05-22 16:58 ` [libvirt] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup\ Stefano Stabellini
[not found] ` <alpine.DEB.2.02.1305221755540.4799@kaball.uk.xensource.com>
2013-05-22 23:44 ` Marek Marczykowski
2013-04-19 11:01 ` [libvirt] [PATCH RESENT 04/12] libxl: populate xenstore memory entries at startup Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5166960C.9060008@invisiblethingslab.com \
--to=marmarek@invisiblethingslab.com \
--cc=Ian.Campbell@citrix.com \
--cc=jfehlig@suse.com \
--cc=libvirt-list@redhat.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.