git: kernel - Further refactor vmstats, adjust page coloring algorithm

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jan 8 20:12:24 PST 2017


commit 759791187dadb402a5310e0eda2dab4f1c4fa402
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jan 8 20:03:38 2017 -0800

    kernel - Further refactor vmstats, adjust page coloring algorithm
    
    * Further refactor vmstats by tracking adjustments in gd->gd_vmstats_adj
      and doing a copyback of the global vmstats into gd->gd_vmstats.  All
      code critical paths access the localized copy to test VM state, removing
      most global cache ping pongs of the global structure.   The global
      structure 'vmstats' still contains the master copy.
    
    * Bump PQ_L2_SIZE up to 512.  We use this to localized the VM page queues.
      Make some adjustments to the pg_color calculation to reduce (in fact
      almost eliminate) SMP conflicts on the vm_page_queue[] between cpus
      when the VM system is operating normally (not paging).
    
    * This pumps the 4-socket opteron test system up to ~4.5-4.7M page
      faults/sec in testing (using a mmap/bzero/munmap loop on 16MB x N
      processes).
    
      This pumps the 2-socket xeon test system up to 4.6M page faults/sec
      with 32 threads (250K/sec on one core, 1M on 4 cores, 4M on 16 cores,
      5.6M on 32 threads).  This is near the theoretical maximum possible for
      this test.
    
    * In this particular page fault test, PC sampling indicates *NO* further
      globals are undergoing cache ping-ponging.  The PC sampling predominantly
      indicates pagezero(), which is expected.  The Xeon is zeroing an aggregate
      of 22GBytes/sec at 32 threads running normal vm_fault's.

Summary of changes:
 sys/kern/init_main.c  |  1 +
 sys/kern/kern_clock.c |  3 +-
 sys/sys/globaldata.h  |  3 +-
 sys/vm/vm_meter.c     | 38 +++++++++++++-------
 sys/vm/vm_page.c      | 99 ++++++++++++++++++++++++++++-----------------------
 sys/vm/vm_page.h      |  2 +-
 sys/vm/vm_page2.h     | 55 +++++++++++++++++++---------
 7 files changed, 126 insertions(+), 75 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/759791187dadb402a5310e0eda2dab4f1c4fa402


-- 
DragonFly BSD source repository



More information about the Commits mailing list