kernel - Fix swapcache inefficiency related to the PQ_INACTIVE queue
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 3 Jan 2012 05:25:47 +0000 (21:25 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 3 Jan 2012 05:34:40 +0000 (21:34 -0800)
commit64949baad746ba8f3a957a675ce437b2f4529a24
treedf28e57c5bad639af9c2e590456a96a648bcc4a2
parentc1745db97f7e31c341644220c7b85281c8dd6013
kernel - Fix swapcache inefficiency related to the PQ_INACTIVE queue

* The swapcache was still coded with the assumption of just one
  PQ_INACTIVE queue.  Even though it scans all 256 queues the
  end-of-queue code could trigger early and prevent later queue
  indices from being scanned, causing a large percentage of eligible
  VM pages to not get written to the swapcache.

  Now all queues must signal that they have reached the end before the
  code sets the end-of-queue condition and loops up to the 1/10 second
  sleep.

* The full count/scount was being applied to each queue individually instead
  of to all queues uniformly, allowing more pages to be laundered than
  desired.  Divide out and add a bit of slop.
sys/vm/vm_pageout.c
sys/vm/vm_swapcache.c