kernel - Fix fragmentation and object list scan bug in swapcache
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 30 Nov 2011 04:46:03 +0000 (20:46 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 30 Nov 2011 04:46:03 +0000 (20:46 -0800)
commitf5f6d24720b2a6d59adc2d6af68754ed3382ff20
tree9b5c7d9dd1f32749b4b2c77fab51406fd882b6b7
parent3cd891f0bef92e5d211330fa006be8d9319c4dd0
kernel - Fix fragmentation and object list scan bug in swapcache

* When swapcache reaches maxswappct (typically 75% of swap) it reduces
  swap use before allowing it to continue to build again, with some
  hysteresis.

* The cleanup phase which reduces swap use was seriously fragmenting swap
  space by cleaning up too small a portion of each VM object.

* Increase the amount cleaned up before moving onto the next VM object.

* Fix bugs in the vm_object_list traversal which could result in a bad
  object being accessed followed by a panic.
sys/vm/vm_swapcache.c