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

[Xen-devel] tmem and construct_dom0 memory allocation race

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] tmem and construct_dom0 memory allocation race
From: Dulloor <dulloor@xxxxxxxxx>
Date: Fri, 18 Jun 2010 16:10:06 -0700
Delivery-date: Fri, 18 Jun 2010 16:11:11 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=OAuRCfruJ2Ikdg+609OAmXnJ96yGMEaB0dA3LM2k7qo=; b=ZUycsbErgWX758M+cgGSFA8gSELjUD6cPBahOZ1MEnaAXDSww0IbSu/8c5M09T8n8f rhTeasUJON09QOlSL+VbCkRXK7EvOyIOgWD7QPldun3AVzEZne58TA8Zkzv/ce2sfNgi GXifHRwRqtnGLWhasgbNZjMIh5Buz8S1g3OPw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=w9V2L4Oy77QIJny1LbcY9tHsQHkiwWAptiyjmlULCm6bAkfzil/0H0pQJXpPdqD5Re u/2bx4TAzRv3lVD45xRYNzzH/kgyvgdNGVE/gzcO1ibJfPDvagHX5ozdNoJqwOS371JM N/h3tgeB3Bx5WD2LWNASQ7sQlvGv6cC4N/Ytw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
tmem could cause Dom0 allocation to fail with error "Not enough RAM
for DOM0 reservation", particularly when used without dom0_mem option.

Following is the sequence :
- init_tmem allocates a set of pages and sets up dstmem and workmem to
alloc pages in MP case (with cpu notifiers)
- construct_dom0 estimates nr_pages by calling avail_domheap_pages
- On other CPUs, tmem cpu_notifier gets called and allocates pages
from domheap, making the construct_dom0's estimate stale.
- construct_dom0 fails

tmem=off or dom0_mem=xxx both solve the problem for now.

-dulloor

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