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

Re: [MirageOS-devel] Mirage/ARM plans

On 15 May 2014 10:52, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
> On 14 May 2014, at 18:18, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>> On 14 May 2014 16:53, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>>> On 14 May 2014, at 15:39, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>>>> On 14 May 2014 15:26, Thomas Gazagnaire <thomas@xxxxxxxxxxxxxx> wrote:
>>>>>> Note that when I refer to 'libc', I'm really talking about libm (which
>>>>>> is essential), a printf implementation, and malloc/calloc.
>>>>> Do we steel need the printf stuff for ocaml 4.02 with the new printf's 
>>>>> GADTs implementation ?
>>>> Good point. For now, it's using Mini-OS's printf functions. They
>>>> mostly work, but don't recognise %F, for example.
>>>> For malloc, Mini-OS provides a malloc that returns contiguous regions
>>>> of (guest) physical memory (it just calls _xmalloc(size,
>>>> DEFAULT_ALIGN)). If OCaml just grabs more memory whenever the heap is
>>>> full, that should be fine. If people are freeing stuff, it could
>>>> become a problem due to fragmentation.
>>> There's very little mallocing relative to the amount of OCaml heap activity 
>>> (which allocates in 2MB chunks by default and could use super pages if 
>>> available). So sticking with the simple allocator should be fine for now.
>> Good news: it's already using super pages (1MB page table entries
>> rather than 4KB). For the 1:1 mapping, that's the easiest thing to do
>> anyway.
> Splendid!  This is on ARM I assume?  Istr superpage patches on x86_64, but 
> not if they were upstreamed. We have a custom patch in the mirage-platform 
> MiniOS that should be easy enough to push upstream if not, though.

Yes, on ARM. The top-level translation table on ARM is an array of
section entries, each of which covers 1MB of virtual memory. Each
entry can either be the address of a corresponding 1MB section of
physical memory, or a pointer to a second-level page table with 4KB
entries. We only use 1MB entries.

(this is simplified; there are other options too)

Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

MirageOS-devel mailing list



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