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

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

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
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

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

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
64 * $FreeBSD: head/sys/vm/vm_object.c 60755 2000-05-21 12:50:18Z peter $
64 * $FreeBSD: head/sys/vm/vm_object.c 61081 2000-05-29 22:40:54Z dillon $
65 */
66
67/*
68 * Virtual memory object module.
69 */
70
71#include <sys/param.h>
72#include <sys/systm.h>

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

828 if (tobject == NULL)
829 continue;
830 tpindex += OFF_TO_IDX(tobject->backing_object_offset);
831 goto shadowlookup;
832 }
833
834 /*
835 * If the page is busy or not in a normal active state,
65 */
66
67/*
68 * Virtual memory object module.
69 */
70
71#include <sys/param.h>
72#include <sys/systm.h>

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

828 if (tobject == NULL)
829 continue;
830 tpindex += OFF_TO_IDX(tobject->backing_object_offset);
831 goto shadowlookup;
832 }
833
834 /*
835 * If the page is busy or not in a normal active state,
836 * we skip it. Things can break if we mess with pages
837 * in any of the below states.
836 * we skip it. If the page is not managed there are no
837 * page queues to mess with. Things can break if we mess
838 * with pages in any of the below states.
838 */
839 if (
840 m->hold_count ||
841 m->wire_count ||
839 */
840 if (
841 m->hold_count ||
842 m->wire_count ||
843 (m->flags & PG_UNMANAGED) ||
842 m->valid != VM_PAGE_BITS_ALL
843 ) {
844 continue;
845 }
846
847 if (vm_page_sleep_busy(m, TRUE, "madvpo"))
848 goto relookup;
849

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

1389 int all;
1390
1391 if (object == NULL ||
1392 object->resident_page_count == 0)
1393 return;
1394
1395 all = ((end == 0) && (start == 0));
1396
844 m->valid != VM_PAGE_BITS_ALL
845 ) {
846 continue;
847 }
848
849 if (vm_page_sleep_busy(m, TRUE, "madvpo"))
850 goto relookup;
851

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

1391 int all;
1392
1393 if (object == NULL ||
1394 object->resident_page_count == 0)
1395 return;
1396
1397 all = ((end == 0) && (start == 0));
1398
1399 /*
1400 * Since physically-backed objects do not use managed pages, we can't
1401 * remove pages from the object (we must instead remove the page
1402 * references, and then destroy the object).
1403 */
1404 KASSERT(object->type != OBJT_PHYS, ("attempt to remove pages from a physical object"));
1405
1397 vm_object_pip_add(object, 1);
1398again:
1399 size = end - start;
1400 if (all || size > object->resident_page_count / 4) {
1401 for (p = TAILQ_FIRST(&object->memq); p != NULL; p = next) {
1402 next = TAILQ_NEXT(p, listq);
1403 if (all || ((start <= p->pindex) && (p->pindex < end))) {
1404 if (p->wire_count != 0) {

--- 415 unchanged lines hidden ---
1406 vm_object_pip_add(object, 1);
1407again:
1408 size = end - start;
1409 if (all || size > object->resident_page_count / 4) {
1410 for (p = TAILQ_FIRST(&object->memq); p != NULL; p = next) {
1411 next = TAILQ_NEXT(p, listq);
1412 if (all || ((start <= p->pindex) && (p->pindex < end))) {
1413 if (p->wire_count != 0) {

--- 415 unchanged lines hidden ---