On Friday 16 February 2007 19:40, Jeff Dike wrote:
> On Fri, Feb 16, 2007 at 12:02:08PM -0500, Jason Lunz wrote:
> > I agree - I have only a vague idea about what uml_reserved means.
>
> This is ancient code - after a quick look through it, I think what is
> happening is this:
>       Early in boot, there are both libc and kernel (bootmem) memory
> allocations happening.  We can't redirect malloc to kmalloc yet, so
> mallocs are allowed to happen until kmalloc is running.  This requires
> that the memory setup code leave some empty room in the address space
> for malloc to grow into.  The end of this area is uml_reserved.
>       When we are ready to turn on kmalloc, the rest of UML physical
> memory (beyond uml_reserved) was already available to the bootmem
> allocator, and it is just released to the page allocator.  The area
> that wasn't malloced by libc is released separately to the page
> allocator.

I was also curious about the "high_physmem - uml_physmem" difference, which I 
now guess I understand - and about seeing this documented so that redundant 
vars could be deleted.

>       At that point, uml_reserved loses its meaning, since memory on
> either side of it is treated identically by the page allocator.

But the purpose of:
        uml_reserved = brk_end;
is probably to restore this meaning: after this, uml_reserved marks again the 
end of the reserved memory, right?

And now that you explain this me, I'm wondering.
How do things work when kmalloc_ok is disabled (i.e. initial_thread_cb)? I 
thought all reserved memory would stay reserved for the whole UML kernel 
lifetime.
-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to