[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-ppc-devel
Subject: Re: [XenPPC] Re: xen heap size
From: Jimi Xenidis <jimix () watson ! ibm ! com>
Date: 2007-02-23 18:43:46
Message-ID: 2118B1D5-736D-4376-B5BC-25285F79F91F () watson ! ibm ! com
[Download RAW message or body]
hmm.. are we always going to include the IO space in dom0->p2m[] or
only when dom0->maxpage > IO_Base?
-JX
On Feb 23, 2007, at 1:05 PM, Ryan Harper wrote:
> * Hollis Blanchard <hollisb@us.ibm.com> [2007-02-23 11:43]:
>> On Fri, 2007-02-23 at 11:12 -0600, Ryan Harper wrote:
>>> * Hollis Blanchard <hollisb@us.ibm.com> [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@us.ibm.com
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic