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: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] big local array in routine in hypervisor
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 27 Jan 2009 08:19:12 +0000
Cc:
Delivery-date: Tue, 27 Jan 2009 00:18:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <bd94788e-ab9d-4861-87ec-15a44e7b31a8@default>
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: AcmAV+8tXLbh+UmsmkaALSk1PFpVyQ==
Thread-topic: [Xen-devel] big local array in routine in hypervisor
User-agent: Microsoft-Entourage/12.15.0.081119
On 27/01/2009 00:43, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

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

Does it *really* have to be multi-page contiguous? You couldn't for example
build your workspace out of a radix tree with page-sized leaves?

Or are you saying that maybe you can't allocate even a single page, or a
sub-page? In that case it would seem memory is so tight you have little
choice but to pre-reserve.

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

So you want us to wastefully pre-reserve some space for you, but call it the
'stack' to assuage your guilt? ;-) It's common practice not to have very
large stacks in kernels, since pre-reservation is wateful, dynamic growth is
not necessarily feasible to implement, and kernel code doesn't tend to need
lots of local storage or recursion. In Linux you'd be limited to 4kB, and
there's a lot more code there living under that stricter regime.

 -- Keir



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