git: kernel - Fix several low memory+swap pageout/killproc issues
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Aug 20 16:52:41 PDT 2015
commit 9cd626ca5e5f0de130507ac57f5f9304a441658e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Aug 20 16:45:27 2015 -0700
kernel - Fix several low memory+swap pageout/killproc issues
* Add significant slop to the PQAVERAGE() calculation in the
pageout daemon and increase the slop in the vm_paging_target()
test the pageout daemon makes to determine if it can stop early.
These adjustments fix a degenerate case when no swap is configured
and a large number of clean pages are present in the inactive queue
which could prevent the pageout daemon from cleaning a sufficient number
of pages and cause it to start killing processes even when plenty of
freeable memory exists.
* Impose a one-second delay when killing processes due to insufficient
memory + swap. This reduces the chance that multiple processes will
be killed even if the first one would have been sufficient by giving
the kernel more time to dipose of the process.
* Fix a bug in vm_page_alloc(). When v_free_count exactly matches
v_free_reserved it successfully passes the vm_page_count_target()
test but vm_page_alloc() will still fail. This results in a livelock
in vm_fault_object() and will livelock the pageout daemon vs a user
process stuck in vm_fault(), causing the machine to lock.
Fixed by adjusting the conditional test in vm_page_alloc().
Reported-by: luxh
Summary of changes:
sys/vm/vm_page.c | 7 ++++-
sys/vm/vm_pageout.c | 74 ++++++++++++++++++++++++++++++++++++++---------------
2 files changed, 59 insertions(+), 22 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9cd626ca5e5f0de130507ac57f5f9304a441658e
--
DragonFly BSD source repository
More information about the Commits
mailing list