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: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Dulloor <dulloor@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] tmem and construct_dom0 memory allocation race
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Mon, 21 Jun 2010 08:35:58 -0700 (PDT)
Cc:
Delivery-date: Mon, 21 Jun 2010 08:37:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C8422FBB.17F0A%keir.fraser@xxxxxxxxxxxxx>
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>
References: <AANLkTilM1bdg1NhGVLpLTu0RLC2qP1Qo-C273BmG7eam@xxxxxxxxxxxxxx C8422FBB.17F0A%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Dulloor --

Intel had previously reported a failure for 2.6.18-xen
dom0+tmem with dom0_mem unspecified.  I'm not sure if
this is the same bug or not.

The latest versions of the Linux-side tmem patch disable
tmem by default (in Linux, not Xen!) and require a kernel
boot option to turn it on.  Since dom0 is special and
I've done very little testing with dom0 using tmem (as
tmem is primarily used with guests), I think the correct
(at least short-term) fix for this will be to not enable
tmem for dom0 when dom0_mem is unspecified.  I haven't
gotten around to updating 2.6.18-xen for awhile, assuming
it is increasingly rarely used (except in products where
dom0_mem is always specified).

I'll try to submit a major update to the Linux-side
tmem patch for the 2.6.18-xen tree soon so at least
it is consistent with other Linux-side Xen patches.

Dan

> -----Original Message-----
> From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx]
> Sent: Saturday, June 19, 2010 1:27 AM
> To: Dulloor; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] tmem and construct_dom0 memory allocation race
> 
> 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

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