From: Dan Magenheimer Subject: Re: domain creation vs querying free memory (xend and xl) Date: Tue, 2 Oct 2012 12:33:15 -0700 (PDT) Message-ID: <66cc0085-1216-40f7-8059-eaf615202c12@default> References: <53b8c758-2675-42a7-b63f-4f9ad0006d84@default> <20581.55931.246130.308384@mariner.uk.xensource.com> <8ba2021c-1095-4fd1-98a5-f6eec8a3498b@default> <20121002091017.GA95926@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121002091017.GA95926@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: Olaf Hering , Keir Fraser , Konrad Wilk , George Dunlap , Kurt Hackel , Ian Jackson , xen-devel@lists.xen.org, George Shuklin , Dario Faggioli , Andres Lagar-Cavilla List-Id: xen-devel@lists.xenproject.org > From: Tim Deegan [mailto:tim@xen.org] > Subject: Re: [Xen-devel] domain creation vs querying free memory (xend and xl) > > At 13:03 -0700 on 01 Oct (1349096617), Dan Magenheimer wrote: > > Bearing in mind that I know almost nothing about xl or > > the tools layer, and that, as a result, I tend to look > > for hypervisor solutions, I'm thinking it's not possible to > > solve this without direct participation of the hypervisor anyway, > > at least while ensuring the solution will successfully > > work with any memory technology that involves ballooning > > with the possibility of overcommit (i.e. tmem, page sharing > > and host-swapping, manual ballooning, PoD)... EVEN if the > > toolset is single threaded (i.e. only one domain may > > be created at a time, such as xapi). [1] > > TTBOMK, Xapi actually _has_ solved this problem, even with ballooning > and PoD. I don't know if they have any plans to support sharing, > swapping or tmem, though. Is this because PoD never independently increases the size of a domain's allocation? If so, then I agree Xapi has solved the problem because in all cases the toolstack knows when the amount of memory allocated to a domain is increasing. However, given that George's 4.3 plan contains: * Memory: Replace PoD with paging mechanism owner: george@citrix status: May need review xapi might want to (re)consider either the above 4.3 feature or see that this problem has been properly fixed prior to 4.3, because I am fairly sure that paging _will_ increase a domain's current allocation without knowledge of the toolstack. > Adding a 'reservation' of free pages that may only be allocated by a > given domain should be straightforward enough, but I'm not sure it helps It absolutely does help. With tmem (and I think with paging), the total allocation of a domain may be increased without knowledge by the toolset. > much. In the 'balloon-to-fit' model where all memory is already > allocated to some domain (or tmem), some part of the toolstack needs to > sort out freeing up the memory before allocating it to another VM. By balloon-to-fit, do you mean that all RAM is occupied? Tmem handles the "sort out freeing up the memory" entirely in the hypervisor, so the toolstack never knows. > Surely that component needs to handle the exclusion too - otherwise a > series of small VM creations could stall a large one indefinitely. Not sure I understand this, but it seems feasible. Dan