This is a major revamping of the pageout and low-memory handling code.
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 18 Dec 2008 21:27:20 +0000 (13:27 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 18 Dec 2008 21:27:20 +0000 (13:27 -0800)
commit20479584e1624aae60acc01070a685a1ae5ae392
tree191e96e8adb01eed9c64c69f7b390092167ba9f3
parentbc823b32d9623d147abbdd8575bb463b05093f84
This is a major revamping of the pageout and low-memory handling code.

The pageout daemon now detects out-of-memory conditions and properly
kills the largest process(es).  This condition occurs when swap is
full (or you have no swap) and most of the remaining VM pages in memory
have become dirty.  With no swap to page to the dirty pages squeeze out
the clean ones.  The pageout daemon detects the case and starts killing
processes.

The pageout daemon now detects stress in the form of excess cpu use
and tries to reduce its cpu footprint when that occurs.  Excess cpu use
can occur when the only pages left in-core are dirty and there is nowhere
to swap them to.  Previously if this case occured the system would basically
just stop working.

These changes make the system truely have VM = RAM+SWAP.  If you 1G of ram
and 1G of swap the system can run up to 2G worth of processes.
sys/kern/vfs_bio.c
sys/platform/pc32/i386/pmap.c
sys/platform/pc64/amd64/pmap.c
sys/platform/vkernel/platform/pmap.c
sys/vm/vm_glue.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_page.c
sys/vm/vm_page2.h
sys/vm/vm_pageout.c