Deleted Added
full compact
vm_glue.c (92475) vm_glue.c (92588)
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 92475 2002-03-17 07:01:42Z alc $
62 * $FreeBSD: head/sys/vm/vm_glue.c 92588 2002-03-18 15:08:09Z green $
63 */
64
65#include "opt_vm.h"
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/lock.h>
70#include <sys/mutex.h>

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

555 mtx_unlock_spin(&sched_lock);
556 ++vm->vm_refcnt;
557 /*
558 * do not swapout a process that
559 * is waiting for VM
560 * data structures there is a
561 * possible deadlock.
562 */
63 */
64
65#include "opt_vm.h"
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/lock.h>
70#include <sys/mutex.h>

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

555 mtx_unlock_spin(&sched_lock);
556 ++vm->vm_refcnt;
557 /*
558 * do not swapout a process that
559 * is waiting for VM
560 * data structures there is a
561 * possible deadlock.
562 */
563 if (vm_map_try_lock(&vm->vm_map)) {
563 if (lockmgr(&vm->vm_map.lock,
564 LK_EXCLUSIVE | LK_NOWAIT,
565 NULL, curthread)) {
564 vmspace_free(vm);
565 PROC_UNLOCK(p);
566 goto nextproc;
567 }
568 vm_map_unlock(&vm->vm_map);
569 /*
570 * If the process has been asleep for awhile and had
571 * most of its pages taken away already, swap it out.

--- 59 unchanged lines hidden ---
566 vmspace_free(vm);
567 PROC_UNLOCK(p);
568 goto nextproc;
569 }
570 vm_map_unlock(&vm->vm_map);
571 /*
572 * If the process has been asleep for awhile and had
573 * most of its pages taken away already, swap it out.

--- 59 unchanged lines hidden ---