WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Xen 4.0.1 "xc_map_foreign_batch: mmap failed: Cannot all

To: Charles Arnold <carnold@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Xen 4.0.1 "xc_map_foreign_batch: mmap failed: Cannot allocate memory"
From: Keir Fraser <keir@xxxxxxx>
Date: Thu, 16 Dec 2010 20:54:24 +0000
Cc:
Delivery-date: Thu, 16 Dec 2010 12:55:26 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=r6NAYP9hFaFohQ1Rr0ZscgHqATAagad8g+UzEUdpOME=; b=dIorABiqmuCJ4f7ZXC3sNw0wFi0HM63Zd9TtCrjjsNB6auDEKbViWEgxVYJPMIsB4X 1BG1Ltjd9/7+RJ2vMYOHX+REHTRaH64LW+nZeuX/HrVVyAEzPwd63USDdwH+jGDmZCtT ZH40nt+BDfWapFkUxNUlRfieUcxB2oCyCvWhk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=xDD+BpZ3PCpgR7JXucgzcu5v3lhLLHAjVOuLvU7P2qVbI+suE2q3bQ7r/AMnCsR3zZ NPZSwt8eHhxyhIjDiV1JDWhLnjhUdGE9+jMIT9cZJnDUB06g/El5gA4vLpqbFmnYuP3G xHV1Qcq/dOo2EpZAiOfhQKVBxhFwXpdBJfMxs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D0A17C6020000910006886E@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcudY2tvfL1Lem6yk0OmgM61zs4F/A==
Thread-topic: [Xen-devel] Xen 4.0.1 "xc_map_foreign_batch: mmap failed: Cannot allocate memory"
User-agent: Microsoft-Entourage/12.28.0.101117
On 16/12/2010 20:44, "Charles Arnold" <carnold@xxxxxxxxxx> wrote:

>>> On 12/16/2010 at 01:33 PM, in message <C9302813.2966F%keir@xxxxxxx>, Keir
> Fraser <keir@xxxxxxx> wrote:
>> On 16/12/2010 19:23, "Charles Arnold" <carnold@xxxxxxxxxx> wrote:
>> 
>>> The bug is that qemu-dm seems to make the assumption that it can mmap from
>>> dom0 all the memory with which the guest has been defined instead of the
>>> memory
>>> that is actually available on the host.
>> 
>> 32-bit dom0? Hm, I thought the qemu mapcache was supposed to limit the total
>> amount of guest memory mapped at one time, for a 32-bit qemu. For 64-bit
>> qemu I wouldn't expect to find a limit as low as 3.25G.
> 
> Sorry, I should have specified that it is a 64 bit dom0 / hypervisor.

Okay, well I'm not sure what limit qemu-dm is hitting then. Mapping 3.25G of
guest memory will only require a few megabytes of pagetables for the qemu
process in dom0. Perhaps there is a ulimit or something set on the qemu
process?

If we can work out and detect this limit, perhaps 64-bit qemu-dm could have
a mapping cache similar to 32-bit qemu-dm, limited to some fraction of the
detected mapping limit. And/or, on mapping failure, we could reclaim
resources by simply zapping the existing cached mappings. Seems there's a
few options. I don't really maintain qemu-dm myself -- you might get some
help from Ian Jackson, Stefano, or Anthony Perard if you need more advice.

 -- Keir

> - Charles
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel