[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XenPPC] Re: xen heap size



* Hollis Blanchard <hollisb@xxxxxxxxxx> [2007-02-23 11:43]:
> On Fri, 2007-02-23 at 11:12 -0600, Ryan Harper wrote:
> > * Hollis Blanchard <hollisb@xxxxxxxxxx> [2007-02-23 10:58]:
> > > On Fri, 2007-02-23 at 10:21 -0600, Ryan Harper wrote:
> > > > 
> > > > The other method I was going to look into was to allocate dom0's rma,
> > > > and then calculation would look like:
> > > > 
> > > >    dom0_start_mfn = page_to_mfn(d->arch.rma_base);
> > > >    dom0_overlap = (dom0_start_mfn + dom0_nrpages - rma_sz) -
> > > > IO_SIZE_PAGES;
> > > >    
> > > > Any other good way to figure how much of dom0's allocation will fall
> > > > within 2-4G IO hole?
> > > 
> > > Why are you looking for another approach? What's wrong with this
> > > solution?
> > 
> > I was hoping I'd find this:
> > 
> > xen/arch/powerpc/memory.c:145
> > 
> >     xenheap_phys_end = xh_pages << PAGE_SHIFT;
> >     printk("End of Xen Area: %luMiB (%luKiB)\n",
> >            xenheap_phys_end >> 20, xenheap_phys_end >> 10);
> > 
> > 
> > which marks the end of the xen area; just what I was looking for.
> > 
> > Now I can do:
> > 
> >    /* overlap in pages into 2G-4G IO range (if any) */
> >    dom0_overlap = ((xenheap_phys_end >> PAGE_SHIFT) + dom0_nrpages) -
> >                   IO_SIZE_PAGES;
> 
> You're assuming that the Xen heap ends exactly where dom0 will begin
> (i.e. where dom0's RMA is allocated), which is not the case. From your
> boot log, we see this:
>         (XEN) End of Xen Area: 144MiB (147456KiB)
>         ...
>         (XEN) xenheap: 000000000006d000 - 0000000000400000
>         (XEN) xenheap: 0000000000c46000 - 0000000009000000
>         (XEN) Xen Heap: 135MiB (138548KiB)
> 
> xenheap_phys_end is 144MB (0x9000000), and when you subtract the space
> from the middle (e.g. occupied by Xen itself), you end up with a total
> of 135MB.
> 
> In this case, dom0's RMA will be allocated at 192MB (0xc000000), and the
> space from 144MB (0x9000000) to 192MB will be assigned to the domain
> heap.

Ah, I see, RMA alignment issues.  192MB is the next 64MB aligned
chunk past xenheap_phys_end.


-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.