summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pageout.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-09-12 15:06:14 +0000
committerdg <dg@FreeBSD.org>1994-09-12 15:06:14 +0000
commit71d8424950db60a9f1f66a5c7015cfcb49c201df (patch)
tree1741f08236fa4c403c4c1cfa1e8c3a9d46b1ea0f /sys/vm/vm_pageout.c
parentd00638ae6a81910056cad306f79ddf7dd93fbd22 (diff)
downloadFreeBSD-src-71d8424950db60a9f1f66a5c7015cfcb49c201df.zip
FreeBSD-src-71d8424950db60a9f1f66a5c7015cfcb49c201df.tar.gz
Fixed a bug I introduced when fixing the rss limit code. Changed swapout
policy to be a bit more selective about what processes get swapped out. Reviewed by: John Dyson
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r--sys/vm/vm_pageout.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 94eac8a..d2d805f 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -65,7 +65,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_pageout.c,v 1.10 1994/09/06 11:28:46 davidg Exp $
+ * $Id: vm_pageout.c,v 1.11 1994/09/12 11:31:36 davidg Exp $
*/
/*
@@ -541,8 +541,7 @@ redeact:
morefree:
/*
- * now check malloc area or swap processes out if we are in low
- * memory conditions
+ * now swap processes out if we are in low memory conditions
*/
if (cnt.v_free_count <= cnt.v_free_min) {
/*
@@ -550,6 +549,7 @@ morefree:
*/
swapout_threads();
}
+
/*
* scan the processes for exceeding their rlimits or if process
* is swapped out -- deactivate pages
@@ -591,7 +591,7 @@ rescanproc1:
limit = 0;
size = p->p_vmspace->vm_pmap.pm_stats.resident_count * NBPG;
- if (limit > 0 && size >= limit) {
+ if (limit >= 0 && size >= limit) {
overage = (size - limit) / NBPG;
vm_pageout_map_deactivate_pages(&p->p_vmspace->vm_map,
(vm_map_entry_t) 0, &overage, vm_pageout_object_deactivate_pages);
@@ -705,7 +705,6 @@ rescan1:
m = next;
}
-
/*
* Compute the page shortage. If we are still very low on memory
* be sure that we will move a minimal amount of pages from active
OpenPOWER on IntegriCloud