git: kernel - Expand physical memory support to 64TB

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Dec 4 12:07:35 PST 2017


commit 8ff9866bf1f55cddbae4ca610cd68b2fb877b965
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Dec 3 23:50:07 2017 -0800

    kernel - Expand physical memory support to 64TB
    
    * Make NKPML4E truly programmable and change the default from 1
      PDP page to 16 PDP pages.  This increases KVM from 512G to
      8TB, which should be enough to accomodate a maximal 64TB
      configuration.
    
      Note that e.g. 64TB of physical ram certainly requires more
      than one kernel PDP page, since the vm_page_array alone
      would require around 2TB, never mind everything else!
    
      PDP entries in the PML4E (512 total @ 512GB per entry):
    	256	User space
    	112	(unused, avail for NKPML4E)
    	128	DMAP (64TB max physical memory)
    	 16	KVM NKPML4E default (8TB) (recommend 64 max)
    
    * Increase the DMAP from 64 PDP pages to 128 PDP pages, allowing
      support for up to 64TB of physical memory.
    
    * Changes the meaning of KPML4I from being 'the index of the only
      PDP page in the PML4e' to 'the index of the first PDP page in
      the PML4e'.  There are NKPML4E PDP pages starting at index KPML4I.
    
    * NKPDPE can now exceed 512.  This is calculated to be the maximmum
      number of PD pages needed for KVM, which is now (NKPML4E*NPDPEPG-1).
    
      We now pre-allocate and populate only enough PD pages to accomodate
      the page tables we are pre-installing.  Those, in turn, are calculated
      to be sufficient for bootstrapping mainly vm_page_array and a large
      initial set of pv_entry structures.
    
    * Remove nkpt, it was not being used any more.

Summary of changes:
 sys/platform/pc64/include/pmap.h      |  30 ++++--
 sys/platform/pc64/include/vmparam.h   |  15 +--
 sys/platform/pc64/x86_64/mp_machdep.c |   1 -
 sys/platform/pc64/x86_64/pmap.c       | 170 +++++++++++++++++++++++-----------
 4 files changed, 146 insertions(+), 70 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8ff9866bf1f55cddbae4ca610cd68b2fb877b965


-- 
DragonFly BSD source repository



More information about the Commits mailing list