kernel - Yield during VM teardown, fix zfree() contention
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 10 Jul 2016 07:46:25 +0000 (00:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 10 Jul 2016 07:46:25 +0000 (00:46 -0700)
commite674353b80e9b15b0374d5154579755e53754184
treec4ec6ca8c71f32d07b286c19c6f9783d2861771e
parent844cfcd65d13ec68f98e077f96bd9307f4a5b969
kernel - Yield during VM teardown, fix zfree() contention

* Yield during the teardown of vm_page's related to process exit
  to allow other processes to get some cpu.  Also use lwkt_user_yield()
  instead of lwkt_yield().

* zfree() had no hysteresis once the pcpu cache was full, causing massive
  contention on the pool spin lock.  Generally only effects page-frees
  (returning the pv_entry to the pool).

  Implement hysteresis on free by moving up to 32 elements out of the pcpu
  cache and back into the pool when the pool becomes full.
sys/platform/pc64/x86_64/pmap.c
sys/vm/vm_object.c
sys/vm/vm_page.h
sys/vm/vm_zone.c