git: kernel - Expand page count fields to 64 bits

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Dec 3 17:32:57 PST 2017


commit b7ea2f3f550021bfaabd8ed8d50b54c157fb55bf
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Dec 3 17:14:15 2017 -0800

    kernel - Expand page count fields to 64 bits
    
    * 32 bit page count fields limit us to 8TB of ram.  Expand to allow
      up to the DMAP limit (32TB).  Do an initial pass on various page
      count fields and change them from int's to long's or vm_pindex_t's.
    
    * Fix a 32-bit overflow in the pv_entry initialization code.
    
      pv_entry_max = shpgperproc * maxproc + vm_page_array_size;
    		  2000 * 1046516 + pages_of_phys_memory;
    
      maxproc is 1046516 @ 512GB.  This calculation overflows its 32
      bit signed variable somewhere between 256G and 512G of ram.  This
      can lead to a zinitna() allocation in pvzone that is much too
      large.
    
    Reported-by: zrj

Summary of changes:
 sys/platform/pc64/x86_64/pmap.c        | 14 +++----
 sys/platform/vkernel64/platform/pmap.c | 23 ++++++-----
 sys/sys/vmmeter.h                      | 47 +++++++++++-----------
 sys/vm/vm_contig.c                     | 22 ++++++-----
 sys/vm/vm_meter.c                      | 66 +++++++++++++++----------------
 sys/vm/vm_page.c                       | 72 +++++++++++++++++-----------------
 sys/vm/vm_page.h                       |  4 +-
 sys/vm/vm_page2.h                      |  4 +-
 sys/vm/vm_pageout.c                    | 59 ++++++++++++++--------------
 9 files changed, 158 insertions(+), 153 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b7ea2f3f550021bfaabd8ed8d50b54c157fb55bf


-- 
DragonFly BSD source repository


More information about the Commits mailing list