kernel - Further refactor vmstats, adjust page coloring algorithm
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 9 Jan 2017 04:03:38 +0000 (20:03 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 9 Jan 2017 04:03:38 +0000 (20:03 -0800)
commit759791187dadb402a5310e0eda2dab4f1c4fa402
tree66d1a8586e86d4b6d847b2730585585645864870
parent55a7854b22e75d4af6e282598f2d84781d731c40
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.
sys/kern/init_main.c
sys/kern/kern_clock.c
sys/sys/globaldata.h
sys/vm/vm_meter.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_page2.h