From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Novotny Subject: Re: [PATCH] Domain creation 4MB memory allocation Date: Wed, 01 Apr 2009 11:48:33 +0200 Message-ID: <49D33871.9060606@redhat.com> References: <49D31CA1.4090103@redhat.com> <49D34AD2.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49D34AD2.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Jan Beulich wrote: >>>> Michal Novotny 01.04.09 09:49 >>> >>>> >> Hi, >> I've found some problems when running 2 guests with and then trying to >> install a new machine (no matter whether using virt-manager or >> virt-install). I am attaching a patch that fixes this problem. >> >> I was working on 8G box and I have done those things: >> 1. xm create PVguest maxmem=2500 memory=2500 >> 2. xm create FVguest maxmem=2500 memory=2500 >> 3. virt-install -l http://path/to/install/ -r 2500 -v --nodisks -n >> someGuestName >> >> Before applying this patch it returned "Cannot allocate memory" error >> but after applying my patch it created a new domain and started >> installation well but it's reproducible sometimes and not everytime. >> > > This is just curing (actually not really curing, just reducing the likelihood of > its occurrence) a symptom, rather than the root cause: What if 4Mb turn > out to be insufficient for someone else on some other machine? In order > to guarantee hvm guest creation to be possible (at least in the case > where shadow paging is to be used - not sure about NPT/EPT's > requirements), there has to be a way to guarantee some small amount > of contiguous memory being available in Xen. Ballooning cannot guarantee > this, and after a longer period of up-time with many guests starting and > dying even using dom0_mem= on the Xen command line doesn't help due > to fragmentation being unavoidable. > > Jan > > Well, in fact setting it to 4MiB is no guarantee at all and this information was done only by testing. Anyway the test case written above is the problem I run into and this solved this issue. 2MiB was surely not enough in my case and therefore I needed to patch it. Any other ideas how to make it running fine? I've tested it on some other configurations/platforms and it was working with no problems so 2MiB were really not enough. Michal