skip the swap-out code if there's no swap space configured.
avoid some hangs in low-memory situations.
This commit is contained in:
parent
d4406ff8c9
commit
0c3dfee2f8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_pdaemon.c,v 1.38 2001/09/26 07:08:41 chs Exp $ */
|
||||
/* $NetBSD: uvm_pdaemon.c,v 1.39 2001/09/30 02:57:34 chs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
@ -721,11 +721,13 @@ uvmpd_scan(void)
|
||||
anon = NULL;
|
||||
|
||||
#ifndef __SWAP_BROKEN
|
||||
|
||||
/*
|
||||
* swap out some processes if we are below our free target.
|
||||
* we need to unlock the page queues for this.
|
||||
*/
|
||||
if (uvmexp.free < uvmexp.freetarg) {
|
||||
|
||||
if (uvmexp.free < uvmexp.freetarg && uvmexp.nswapdev != 0) {
|
||||
uvmexp.pdswout++;
|
||||
UVMHIST_LOG(pdhist," free %d < target %d: swapout",
|
||||
uvmexp.free, uvmexp.freetarg, 0, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user