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] tmem and construct_dom0 memory allocation race

To: Dulloor <dulloor@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] tmem and construct_dom0 memory allocation race
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Sat, 19 Jun 2010 08:26:35 +0100
Cc:
Delivery-date: Sat, 19 Jun 2010 00:27:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTilM1bdg1NhGVLpLTu0RLC2qP1Qo-C273BmG7eam@xxxxxxxxxxxxxx>
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: AcsPO4VTHYt5/q7KTSq7Rg9Mv5VLPQARTn7k
Thread-topic: [Xen-devel] tmem and construct_dom0 memory allocation race
User-agent: Microsoft-Entourage/12.24.0.100205
On 19/06/2010 00:10, "Dulloor" <dulloor@xxxxxxxxx> wrote:

> 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.

Xen boot is pretty serialised. In particular SMP boot, and all cpu
notification calls, should be done before dom0 is constructed. So, have you
actually seen this race?

 -- Keir



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