Deleted Added
full compact
vm_object.c (207531) vm_object.c (207669)
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

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

58 * rights to redistribute these changes.
59 */
60
61/*
62 * Virtual memory object module.
63 */
64
65#include <sys/cdefs.h>
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

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

58 * rights to redistribute these changes.
59 */
60
61/*
62 * Virtual memory object module.
63 */
64
65#include <sys/cdefs.h>
66__FBSDID("$FreeBSD: head/sys/vm/vm_object.c 207531 2010-05-02 18:09:33Z alc $");
66__FBSDID("$FreeBSD: head/sys/vm/vm_object.c 207669 2010-05-05 18:16:06Z alc $");
67
68#include "opt_vm.h"
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/lock.h>
73#include <sys/mman.h>
74#include <sys/mount.h>

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

1456 if ((m->oflags & VPO_BUSY) || m->busy) {
1457 VM_OBJECT_UNLOCK(new_object);
1458 m->oflags |= VPO_WANTED;
1459 msleep(m, VM_OBJECT_MTX(orig_object), PVM, "spltwt", 0);
1460 VM_OBJECT_LOCK(new_object);
1461 goto retry;
1462 }
1463 vm_page_lock(m);
67
68#include "opt_vm.h"
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/lock.h>
73#include <sys/mman.h>
74#include <sys/mount.h>

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

1456 if ((m->oflags & VPO_BUSY) || m->busy) {
1457 VM_OBJECT_UNLOCK(new_object);
1458 m->oflags |= VPO_WANTED;
1459 msleep(m, VM_OBJECT_MTX(orig_object), PVM, "spltwt", 0);
1460 VM_OBJECT_LOCK(new_object);
1461 goto retry;
1462 }
1463 vm_page_lock(m);
1464 vm_page_lock_queues();
1465 vm_page_rename(m, new_object, idx);
1464 vm_page_rename(m, new_object, idx);
1466 vm_page_unlock_queues();
1467 vm_page_unlock(m);
1468 /* page automatically made dirty by rename and cache handled */
1469 vm_page_busy(m);
1470 }
1471 if (orig_object->type == OBJT_SWAP) {
1472 /*
1473 * swap_pager_copy() can sleep, in which case the orig_object's
1474 * and new_object's locks are released and reacquired.

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

1686 /*
1687 * Page does not exist in parent, rename the
1688 * page from the backing object to the main object.
1689 *
1690 * If the page was mapped to a process, it can remain
1691 * mapped through the rename.
1692 */
1693 vm_page_lock(p);
1465 vm_page_unlock(m);
1466 /* page automatically made dirty by rename and cache handled */
1467 vm_page_busy(m);
1468 }
1469 if (orig_object->type == OBJT_SWAP) {
1470 /*
1471 * swap_pager_copy() can sleep, in which case the orig_object's
1472 * and new_object's locks are released and reacquired.

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

1684 /*
1685 * Page does not exist in parent, rename the
1686 * page from the backing object to the main object.
1687 *
1688 * If the page was mapped to a process, it can remain
1689 * mapped through the rename.
1690 */
1691 vm_page_lock(p);
1694 vm_page_lock_queues();
1695 vm_page_rename(p, object, new_pindex);
1692 vm_page_rename(p, object, new_pindex);
1696 vm_page_unlock_queues();
1697 vm_page_unlock(p);
1698 /* page automatically made dirty by rename */
1699 }
1700 p = next;
1701 }
1702 return (r);
1703}
1704

--- 737 unchanged lines hidden ---
1693 vm_page_unlock(p);
1694 /* page automatically made dirty by rename */
1695 }
1696 p = next;
1697 }
1698 return (r);
1699}
1700

--- 737 unchanged lines hidden ---