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-ppc-devel

Re: [XenPPC] [xenppc-unstable] [POWERPC][XEN] Allocate more memory than

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [XenPPC] [xenppc-unstable] [POWERPC][XEN] Allocate more memory than RMA for Dom0
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Mon, 28 Aug 2006 10:47:36 -0500
Delivery-date: Mon, 28 Aug 2006 08:47:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1GHR7P-0000j0-Tp@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <E1GHR7P-0000j0-Tp@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sun, 2006-08-27 at 20:20 +0000, Xen patchbot-xenppc-unstable wrote:
> @@ -155,13 +159,36 @@ int construct_dom0(struct domain *d,
>      /* By default DOM0 is allocated all available memory. */
>      d->max_pages = ~0U;
>  
> +    /* default is the max(1/16th of memory, CONFIG_MIN_DOM0_PAGES) */
>      if (dom0_nrpages == 0) {
> -        dom0_nrpages = 1UL << d->arch.rma_order;
> -    }
> +        dom0_nrpages = total_pages >> 4;
> +
> +        if (dom0_nrpages < CONFIG_MIN_DOM0_PAGES)
> +            dom0_nrpages = CONFIG_MIN_DOM0_PAGES;
> +    }
> +
> +    /* make sure we are at least as big as the RMA */
> +    if (dom0_nrpages < rma_nrpages)
> +        dom0_nrpages = rma_nrpages;
> +    else
> +        dom0_nrpages = allocate_extents(d, dom0_nrpages, rma_nrpages);
>  
>      d->tot_pages = dom0_nrpages;
>      ASSERT(d->tot_pages > 0); 

Note that dom0_nrpages here doesn't do anything other than confuse the
memory accounting (though we don't try to destroy dom0, so it doesn't
matter too much ATM).

In particular, we're assigning d->tot_pages without actually doing any
heap allocation.

-- 
Hollis Blanchard
IBM Linux Technology Center


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

<Prev in Thread] Current Thread [Next in Thread>