Deleted Added
full compact
vm_glue.c (14432) vm_glue.c (14531)
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 45 unchanged lines hidden (view full) ---

54 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
55 * School of Computer Science
56 * Carnegie Mellon University
57 * Pittsburgh PA 15213-3890
58 *
59 * any improvements or extensions that they make and grant Carnegie the
60 * rights to redistribute these changes.
61 *
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 45 unchanged lines hidden (view full) ---

54 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
55 * School of Computer Science
56 * Carnegie Mellon University
57 * Pittsburgh PA 15213-3890
58 *
59 * any improvements or extensions that they make and grant Carnegie the
60 * rights to redistribute these changes.
61 *
62 * $Id: vm_glue.c,v 1.41 1996/03/02 02:54:19 dyson Exp $
62 * $Id: vm_glue.c,v 1.42 1996/03/09 06:57:53 dyson Exp $
63 */
64
65#include "opt_ddb.h"
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/proc.h>
70#include <sys/resourcevar.h>

--- 370 unchanged lines hidden (view full) ---

441
442loop:
443 while ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) {
444 VM_WAIT;
445 }
446
447 pp = NULL;
448 ppri = INT_MIN;
63 */
64
65#include "opt_ddb.h"
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/proc.h>
70#include <sys/resourcevar.h>

--- 370 unchanged lines hidden (view full) ---

441
442loop:
443 while ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) {
444 VM_WAIT;
445 }
446
447 pp = NULL;
448 ppri = INT_MIN;
449 for (p = (struct proc *) allproc; p != NULL; p = p->p_next) {
449 for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
450 if (p->p_stat == SRUN &&
451 (p->p_flag & (P_INMEM | P_SWAPPING)) == 0) {
452 int mempri;
453
454 pri = p->p_swtime + p->p_slptime - p->p_nice * 8;
455 mempri = pri > 0 ? pri : 0;
456 /*
457 * if this process is higher priority and there is

--- 42 unchanged lines hidden (view full) ---

500 register struct proc *p;
501 struct proc *outp, *outp2;
502 int outpri, outpri2;
503 int didswap = 0;
504
505 outp = outp2 = NULL;
506 outpri = outpri2 = INT_MIN;
507retry:
450 if (p->p_stat == SRUN &&
451 (p->p_flag & (P_INMEM | P_SWAPPING)) == 0) {
452 int mempri;
453
454 pri = p->p_swtime + p->p_slptime - p->p_nice * 8;
455 mempri = pri > 0 ? pri : 0;
456 /*
457 * if this process is higher priority and there is

--- 42 unchanged lines hidden (view full) ---

500 register struct proc *p;
501 struct proc *outp, *outp2;
502 int outpri, outpri2;
503 int didswap = 0;
504
505 outp = outp2 = NULL;
506 outpri = outpri2 = INT_MIN;
507retry:
508 for (p = (struct proc *) allproc; p != NULL; p = p->p_next) {
508 for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
509 if (!swappable(p))
510 continue;
511 switch (p->p_stat) {
512 default:
513 continue;
514
515 case SSLEEP:
516 case SSTOP:

--- 116 unchanged lines hidden ---
509 if (!swappable(p))
510 continue;
511 switch (p->p_stat) {
512 default:
513 continue;
514
515 case SSLEEP:
516 case SSTOP:

--- 116 unchanged lines hidden ---