git: kernel - Adjust KVA use on i386 and x86_64

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Sep 29 11:51:58 PDT 2010


commit 948209ced623a677639255d06b6a8470f3605b27
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Sep 29 11:38:30 2010 -0700

    kernel - Adjust KVA use on i386 and x86_64
    
    The i386 changes recover another ~60MB of KVM for kernel use.  This is an
    attempt to further reduce KVM use based on bug reports from people running
    production systems.
    
    The x86_64 changes recognize the now much-larger KVM space (128G+) and
    remove some i386-era limitations.
    
    * i386 - Reduce the nominal maximum swbufs on i386 from 256 to 128,
      saving 16MB of KVM (and also 16MB of real memory).
    
      Now that we have swbufs both with and without kva we don't really
      need so many with kva.
    
    * i386 - Reduce pv_entry reservation on machines with maximal memory
      configurations from 2.5-3M entries down to 1.4M entries.
    
      In addition to fixing a bug which counted vm_page_array_size twice
      (which is also fixed on x86_64 in this commit), also put a soft cap
      of 1.4M pv entries.  Most production machines never even get close
      to the old cap and this saves us at least 45MB of KVM on machines
      with 3G+ of ram.
    
      The cap can be raised with a kenv boot variable (vm.pmap.pv_entries).
    
    * x86_64 - Increase the maximum buffer cache size from 400MB to 1GB.
      This will effect machines with >4G of ram.  A machine with 8G of
      ram will wind up with ~800MB worth of buffer cache.
    
      In particular this should improve HAMMER's cache performance since
      the presence of a cache bp is needed to circumvent the per-mount
      lock.  This may also improve flushes but it is hard to say.
    
    Reported-by: Peter Avalos <peter at theshell.com>

Summary of changes:
 sys/cpu/x86_64/include/param.h   |    5 +++-
 sys/platform/pc32/i386/machdep.c |    3 +-
 sys/platform/pc32/i386/pmap.c    |   41 ++++++++++++++++++++++++++++++++-----
 sys/platform/pc64/x86_64/pmap.c  |   19 +++++++++++++----
 4 files changed, 55 insertions(+), 13 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/948209ced623a677639255d06b6a8470f3605b27


-- 
DragonFly BSD source repository





More information about the Commits mailing list