VM - Adjust inactive_target and pageout code.
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 2 Nov 2009 05:50:32 +0000 (21:50 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 2 Nov 2009 05:50:32 +0000 (21:50 -0800)
commit51db7ca2caa1000f5b348048cf568c6372121061
tree73d384aad825a8fdb861274b5f384d4c0c562afe
parent6aec797f8848c312024e9092b0888f7a98dfdf8d
VM - Adjust inactive_target and pageout code.

Continue tuning page recyclement in the VM paging queues.  Fix an issue
where the memory used to recycle one-time-use cache data becomes too
constricted.  For example if blogbench is run on one directory and then
run again on another directory, too many pages cached from the first run
were being left in the active queue and not recycled.

The only way to deal with this is to allow the pageout code to pull pages
from the active queue to the inactive queue.  This in turn resurrects the
issue of overnight processes (whos pages are idle, after all), getting
excessively uncached.  I think the goal needs to be to reduce excessive
recyclement of such pages over a shorter time-frame, such as an hour.
Adjusting vfs.vm_cycle_point higher may help (but we don't do it in this
commit).

* Change the pageout code a bit to pull a limited number of pages from
  the active queue to the inactive queue if the inactive target has not
  been met but the cache+free targets were satisfied from the inactive
  queue.  This allows the inactive_target to be increased without creating
  additional mangement overhead on the machine.

* Increase the inactive_target to 1/2 of probed memory.

* Document the issues involved with pulling pages out of the active queue.
sys/vm/vm_pageout.c