git: kernel - Fix swap-full process killer

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Apr 30 10:32:35 PDT 2015


commit 09eff54480fb055069cd958cd5e25bfb797425a8
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Apr 30 10:25:27 2015 -0700

    kernel - Fix swap-full process killer
    
    * Previously once swap became full the kernel could enter a dead zone where
      no new pagouts are possible but there is just barely sufficient memory for
      the system to run.  That is, the minimum free page target is met but the
      pageout target cannot be met.
    
      This caused a 2+ second stall in the VM system followed by a 1 second
      run (where the pageout demon stops trying for 1 second before trying again),
      making the system unusable anyway.
    
    * Replace that code.  Now we start killing processes once swap becomes full
      and we are unable to reach our paging target.  That is, we require that the
      pageout demon MUST be able to reach its paging target for free pages for
      the system to run well, even if there are barely sufficient pages to run
      the current steady state.
    
    * Total anonymous (pageable) memory is still effectively RAM + SWAP.  It's
      just slightly less than it was before because it requires the free page
      target to be met and not just the free page minimum.
    
    Reported-by: marino

Summary of changes:
 sys/vm/swap_pager.c | 17 ++++++++++++++++-
 sys/vm/swap_pager.h |  2 ++
 sys/vm/vm_pageout.c | 47 ++++++++++++++++++++---------------------------
 sys/vm/vm_swap.c    |  1 +
 4 files changed, 39 insertions(+), 28 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/09eff54480fb055069cd958cd5e25bfb797425a8


-- 
DragonFly BSD source repository


More information about the Commits mailing list