kernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 22 Feb 2010 02:33:43 +0000 (18:33 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 22 Feb 2010 02:33:43 +0000 (18:33 -0800)
commitfdc53cc7c5e423755fd5e68cf77e4cb58ce34679
treea83d6ea21cf505a06bbd26af24666f64b814793c
parentc2fb025d4cd1fc6d547f7ae973ee7b227c83bf15
kernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21

* vm_swapcache_inactive_heuristic can overflow, making it extremely negative
  and causing swapcache writing to cease for a long period of time.

* Two-in-one fix.  Check if it is too negative and reset it.  This also
  automatically adjusts the heuristic if the sysop manually changes
  the hysteresis to a smaller value.
sys/vm/vm_swapcache.c