summaryrefslogtreecommitdiff
path: root/sys/vm/vm_glue.c
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-10-06 15:29:00 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-10-06 15:29:00 +0000
commite676b3b5ac1041891584dd10c6bde24b82ebb2f2 (patch)
tree4a8713f46221eee3951af02dd885b8dd8a1bf869 /sys/vm/vm_glue.c
parent62c64950f8e658fa60106b4d32e70ae3b6156d0d (diff)
VFS Lite2 Changes
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r--sys/vm/vm_glue.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index a3abdf369da..9d7ae19daeb 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_glue.c,v 1.24 1997/07/25 06:03:07 mickey Exp $ */
+/* $OpenBSD: vm_glue.c,v 1.25 1997/10/06 15:28:52 csapuntz Exp $ */
/* $NetBSD: vm_glue.c,v 1.55.4.1 1996/06/13 17:25:45 cgd Exp $ */
/*
@@ -36,7 +36,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)vm_glue.c 8.6 (Berkeley) 1/5/94
+ * @(#)vm_glue.c 8.9 (Berkeley) 3/4/95
*
*
* Copyright (c) 1987, 1990 Carnegie-Mellon University.
@@ -381,13 +381,16 @@ scheduler()
loop:
#ifdef DEBUG
- while (!enableswap)
+ while (!enableswap) {
+ panic ("swap disabled??");
tsleep((caddr_t)&proc0, PVM, "noswap", 0);
+ }
#endif
pp = NULL;
ppri = INT_MIN;
for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
if (p->p_stat == SRUN && (p->p_flag & P_INMEM) == 0) {
+
pri = p->p_swtime + p->p_slptime - p->p_nice * 8;
if (pri > ppri) {
pp = p;
@@ -411,6 +414,7 @@ loop:
* We would like to bring someone in.
* This part is really bogus cuz we could deadlock on memory
* despite our feeble check.
+ * XXX should require at least vm_swrss / 2
*/
if (cnt.v_free_count > atop(USPACE)) {
#ifdef DEBUG