Large virtual page size support.

Jeff Roberson jroberson at chesapeake.net
Tue Jan 17 00:44:38 PST 2006


I have implemented support in the vm for PAGE_SIZE values which are a 
multiple of the hardware page size.  This is primarily useful for two 
things:

1) Shrinking the size of the vm page array so that very large memory x86 
PAE machines may boot.

2) Improving performance of many operations due to decreased page list 
sizes as well as improved efficiency of many vm operations.  In the 
particular application that this was developed for the fs block size, page 
size, and jumbo frame size were all made equal at 8k on a box with 4k 
pages.  This made page flipping etc. very fast.

This has been done with full userland backwards compatibility.  Userland 
still has the ability to map things in native page size chunks.  The 
majority of the system software remains unchanged.  The vm gains some 
complexity and the elf loader gains some complexity since both need to be 
able to deal with native page size and virtual page size.

The real page size is now CPU_PAGE_SIZE while PAGE_SIZE is the virtual 
page size which is the smallest unit of memory handed back by the page 
allocation routines.  KVA is also managed in PAGE_SIZE chunks.  The x86 
pmap code has a small allocator that deals with allocating real pages for 
page table entries.

I wrote this code for a client who would like for it to be in the freebsd 
tree.  However, it does add some complexity and so I doubt freebsd wants 
it unless there is a clear demand for it.  What I'd like to know is, does 
anyone else find this useful?  Do the developers who work on the vm think 
this is just a horrible hack?  Does anyone care about PAE anymore?

Let me know what you think.  The patch is available at
http://www.chesapeake.net/~jroberson/8k.diff.  It will not apply to any 
version of freebsd that you have.  Please consider it read only and not 
testable until I decide whether it's worth porting.

Cheers,
Jeff


More information about the freebsd-arch mailing list