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] big local array in routine in hypervisor

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] big local array in routine in hypervisor
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 27 Jan 2009 00:43:00 +0000 (GMT)
Cc:
Delivery-date: Mon, 26 Jan 2009 16:43:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5A3F689.21D95%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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Rats!  I need a large contiguous "workspace" (for compression)
but can't assume that the heap isn't fragmented.  I can pre-reserve
it but that will cause scaleability problems later, because
it would be too wasteful to pre-reserve one for each processor.
I guess I'll pre-reserve and protect it with a lock for now
and worry about contention later.

Is there one stack per physical processor?  Or is there some
other reason (other than historical) for the stack to be so
limited in size?

> -----Original Message-----
> From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx]
> Sent: Monday, January 26, 2009 4:24 PM
> To: Dan Magenheimer; Xen-Devel (E-mail)
> Subject: Re: [Xen-devel] big local array in routine in hypervisor
> 
> 
> It's definitely not safe. Don't do it! The stack is only a 
> few kilobytes and
> needs to be shared with possibly multiple nested interrupt contexts.
> 
>  -- Keir
> 
> On 26/01/2009 22:41, "Dan Magenheimer" 
> <dan.magenheimer@xxxxxxxxxx> wrote:
> 
> > Is it always safe to have a large local array in a routine
> > in the hypervisor, say 2-3 pages (8k-12k) in size?  (I suppose
> > that may be 32k-48k on ia64 since the code is arch-neutral.)
> > Or is there some possibility the Xen stack will overflow?
> > 
> > If not always safe, is there any way to test to see if it safe
> > or how large is safe?
> > 
> > Thanks,
> > Dan
> > 
> > _______________________________________________
> > 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