diff options
author | dyson <dyson@FreeBSD.org> | 1996-10-17 02:58:20 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-10-17 02:58:20 +0000 |
commit | ea70b20311079a0f194091ef0c27458aabda1d30 (patch) | |
tree | ac10e22e062a50f074e337ba215a0fda5676a40d /sys/vm | |
parent | 576dd5e9f61048e157385203efbf83c1d9afac6f (diff) | |
download | FreeBSD-src-ea70b20311079a0f194091ef0c27458aabda1d30.zip FreeBSD-src-ea70b20311079a0f194091ef0c27458aabda1d30.tar.gz |
Make processes waken up eligible for immediate swap-in.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_glue.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index a76bdeb..af888fa 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.53 1996/09/15 11:24:21 bde Exp $ + * $Id: vm_glue.c,v 1.54 1996/10/15 03:16:44 dyson Exp $ */ #include <sys/param.h> @@ -319,7 +319,10 @@ loop: (p->p_flag & (P_INMEM | P_SWAPPING)) == 0) { int mempri; - pri = p->p_swtime + p->p_slptime - p->p_nice * 8; + pri = p->p_swtime + p->p_slptime; + if ((p->p_flag & P_SWAPINREQ) == 0) { + pri -= p->p_nice * 8; + } mempri = pri > 0 ? pri : 0; /* * if this process is higher priority and there is @@ -334,12 +337,14 @@ loop: } /* - * Nothing to do, back to sleep + * Nothing to do, back to sleep. */ if ((p = pp) == NULL) { tsleep(&proc0, PVM, "sched", 0); goto loop; } + p->p_flag &= ~P_SWAPINREQ; + /* * We would like to bring someone in. (only if there is space). */ |