Deleted Added
full compact
vm_glue.c (72200) vm_glue.c (72376)
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 * $FreeBSD: head/sys/vm/vm_glue.c 72200 2001-02-09 06:11:45Z bmilekic $
62 * $FreeBSD: head/sys/vm/vm_glue.c 72376 2001-02-12 00:20:08Z jake $
63 */
64
65#include "opt_rlimit.h"
66#include "opt_vm.h"
67
68#include <sys/param.h>
69#include <sys/systm.h>
70#include <sys/proc.h>

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

472 mtx_unlock_spin(&sched_lock);
473 continue;
474
475 case SSLEEP:
476 case SSTOP:
477 /*
478 * do not swapout a realtime process
479 */
63 */
64
65#include "opt_rlimit.h"
66#include "opt_vm.h"
67
68#include <sys/param.h>
69#include <sys/systm.h>
70#include <sys/proc.h>

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

472 mtx_unlock_spin(&sched_lock);
473 continue;
474
475 case SSLEEP:
476 case SSTOP:
477 /*
478 * do not swapout a realtime process
479 */
480 if (RTP_PRIO_IS_REALTIME(p->p_rtprio.type)) {
480 if (PRI_IS_REALTIME(p->p_pri.pri_class)) {
481 mtx_unlock_spin(&sched_lock);
482 continue;
483 }
484
485 /*
486 * Do not swapout a process waiting on a critical
487 * event of some kind. Also guarantee swap_idle_threshold1
488 * time in memory.
489 */
481 mtx_unlock_spin(&sched_lock);
482 continue;
483 }
484
485 /*
486 * Do not swapout a process waiting on a critical
487 * event of some kind. Also guarantee swap_idle_threshold1
488 * time in memory.
489 */
490 if (((p->p_priority & 0x7f) < PSOCK) ||
490 if (((p->p_pri.pri_level) < PSOCK) ||
491 (p->p_slptime < swap_idle_threshold1)) {
492 mtx_unlock_spin(&sched_lock);
493 continue;
494 }
495
496 /*
497 * If the system is under memory stress, or if we are swapping
498 * idle processes >= swap_idle_threshold2, then swap the process

--- 79 unchanged lines hidden ---
491 (p->p_slptime < swap_idle_threshold1)) {
492 mtx_unlock_spin(&sched_lock);
493 continue;
494 }
495
496 /*
497 * If the system is under memory stress, or if we are swapping
498 * idle processes >= swap_idle_threshold2, then swap the process

--- 79 unchanged lines hidden ---