kernel - Rearrange pmap_growkernel() and fix up x86_64's pmap_growkernel()
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 26 Sep 2010 18:46:20 +0000 (11:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 26 Sep 2010 18:46:20 +0000 (11:46 -0700)
commita8cf2878049f94b5d02b9bf0fc7c332b2fd95663
tree7e3beb70f727b2b70b73a5c1dc1cb714f9b8ab7f
parent83f9f34cf4029fff5146ad725a6a83825e07160c
kernel - Rearrange pmap_growkernel() and fix up x86_64's pmap_growkernel()

* Rearrange pmap_growkernel() to pass an address range instead of just an
  end address.

* vm_map() no longer retries after calling pmap_growkernel(), the function
  either succeeds or panics.

* x86_64 - kldloading modules after system boot no longer populates 128GB
  worth of page tables (which eats ~256MB of ram) in order to push
  kernel_vm_end past KERNBASE.

  Instead, any kldloads into the space beyond KERNBASE, which is required
  to be able to link them into the kernel due to 32-bit PC-relative
  addressing, will populate just the required page tables and will not
  bump up kernel_vm_end.

* Fixes a panic which can occur well after boot when kldload'ing the first
  module, if 256MB worth of free pages is not instantly available.

* Saves us 256M of ram on x86_64.
sys/platform/pc32/i386/pmap.c
sys/platform/pc64/x86_64/pmap.c
sys/platform/vkernel/platform/pmap.c
sys/platform/vkernel64/platform/pmap.c
sys/sys/param.h
sys/vm/pmap.h
sys/vm/vm_map.c