summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1994-09-12 15:06:14 +0000
committerDavid Greenman <dg@FreeBSD.org>1994-09-12 15:06:14 +0000
commit11b224dca244fb8ced7601dbeb9248b614fb431e (patch)
tree1741f08236fa4c403c4c1cfa1e8c3a9d46b1ea0f
parent5bdea7c87fe0ecb50ada3cb0402a9f90b6863309 (diff)
Notes
-rw-r--r--sys/vm/vm_glue.c14
-rw-r--r--sys/vm/vm_pageout.c9
2 files changed, 15 insertions, 8 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 2fc7aba46ffe..668b7f9ec2bf 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -59,7 +59,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_glue.c,v 1.5 1994/08/09 10:42:41 davidg Exp $
+ * $Id: vm_glue.c,v 1.6 1994/08/18 22:36:01 wollman Exp $
*/
#include <sys/param.h>
@@ -518,7 +518,11 @@ swapmore:
continue;
}
vm_map_unlock( &p->p_vmspace->vm_map);
- if (p->p_slptime > maxslp) {
+ /*
+ * If the process has been asleep for awhile and had most
+ * of its pages taken away already, swap it out.
+ */
+ if ((p->p_slptime > maxslp) && (p->p_vmspace->vm_pmap.pm_stats.resident_count <= 6)) {
swapout(p);
didswap++;
} else if ((tpri = p->p_slptime + p->p_nice * 8) > outpri) {
@@ -539,7 +543,11 @@ swapmore:
p = outp2;
}
- if (p) {
+ /*
+ * Only swapout processes that have already had most
+ * of their pages taken away.
+ */
+ if (p && (p->p_vmspace->vm_pmap.pm_stats.resident_count <= 6)) {
swapout(p);
didswap = 1;
}
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 94eac8a23bdf..d2d805f2cdf5 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