string. The actual functional changes are:
1. in vm_page_alloc(), restore some long lost code by Paul Kranenburg
that reserves the last few pages for kernel objects, adding an
additional escape for the pageout daemon.
2. In vm_wait() (replaces VM_WAIT), recognize the amusing fatal
deadlock where the pagedemon sleeps on a channel that only it ever
wakes up, and add a timeout and printf. Mod 1 should generally
prevent this from happening in any case.
3. Fix a livelock in vm_pageout_page() caused by a pre-wakeup of
page consumers prior to the pageout, which can easily fail over
memory issues in NFS and IP code. Also, ++ cnt.v_pageouts only
if the pageout succeeded.
Create macros (with names borrowed from Mach 3) to manipulate
object->paging_in_progress, and use them. When decreasing the
paging count, always make sure to wake up anyone waiting.
Fixes `vospgc', `vosca1', and `vosca2' hangs.
pathological behaviour (freezes) when running short of free pages. see
PR#2755 for a more detailed explanation (from jonathan).
thanks to john dyson for the first cut of this change.