diff options
| author | John Dyson <dyson@FreeBSD.org> | 1996-10-17 02:58:20 +0000 |
|---|---|---|
| committer | John Dyson <dyson@FreeBSD.org> | 1996-10-17 02:58:20 +0000 |
| commit | a669a6e9a99e2cd7acb6025890ec4e9ceab1b468 (patch) | |
| tree | ac10e22e062a50f074e337ba215a0fda5676a40d /sys/vm | |
| parent | ad98052216b3e80662226439c805809104c730c9 (diff) | |
Notes
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 a76bdeb528ac..af888fa9fda1 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). */ |
