cvs commit: src/sys/amd64/include pmap.h

Alan Cox alc at cs.rice.edu
Mon Jun 30 16:56:44 UTC 2008


Ed Schouten wrote:

>Alan,
>
>* Ruslan Ermilov <ru at FreeBSD.org> wrote:
>  
>
>>Can you please draw a new layout, similar to the one made by Peter?
>>
>>http://lists.freebsd.org/pipermail/freebsd-amd64/2005-July/005578.html
>>    
>>
>
>I'm not familiar with the design of amd64 or its page tables, but is
>there some kind of overhead when all 512 GB's would be allocated as kva?
>  
>

Yes, it would consume a rather large amount of (physical) memory.  
Roughly speaking, we preallocate memory for the page table that 
implements the kernel's address space.  In other words, mapping a page 
into the kernel's address space never requires the allocation of (page 
table) memory, and unmapping a page never frees memory.  This has some 
benefits, e.g., we will never block while mapping physical memory into 
the kernel's address space, and we can use a very simple, very fast 
method for mapping part of a file into the buffer cache.

In general, that is, on most machine architectures, we can use a very 
simple technique to avoid preallocating page table memory that can't 
possibly be used.  However, on amd64, the need to have kernel code and 
global/static variables in the highest 2GB of the kernel's address space 
undermines the effectiveness of that technique.  So, it is still 
impractical to make the amd64 kernel address space arbitrarily large, as 
in 512GB.

Alan



More information about the cvs-src mailing list