vm_fault.c (9a89977bf633d71760fa57a7542ef0f7fc0349e5) vm_fault.c (40cbcb996c0827dc5af93744a86c22198cac5f41)
1/*-
2 * SPDX-License-Identifier: (BSD-4-Clause AND MIT-CMU)
3 *
4 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved.
6 * Copyright (c) 1994 John S. Dyson
7 * All rights reserved.
8 * Copyright (c) 1994 David Greenman

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

1725 * When "fs->first_object" is a shadow object, the pages in the backing object
1726 * that precede the faulting pindex are deactivated by vm_fault(). So, this
1727 * function must only be concerned with pages in the first object.
1728 */
1729static void
1730vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, int ahead)
1731{
1732 vm_map_entry_t entry;
1/*-
2 * SPDX-License-Identifier: (BSD-4-Clause AND MIT-CMU)
3 *
4 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved.
6 * Copyright (c) 1994 John S. Dyson
7 * All rights reserved.
8 * Copyright (c) 1994 David Greenman

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

1725 * When "fs->first_object" is a shadow object, the pages in the backing object
1726 * that precede the faulting pindex are deactivated by vm_fault(). So, this
1727 * function must only be concerned with pages in the first object.
1728 */
1729static void
1730vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, int ahead)
1731{
1732 vm_map_entry_t entry;
1733 vm_object_t first_object, object;
1733 vm_object_t first_object;
1734 vm_offset_t end, start;
1735 vm_page_t m, m_next;
1736 vm_pindex_t pend, pstart;
1737 vm_size_t size;
1738
1734 vm_offset_t end, start;
1735 vm_page_t m, m_next;
1736 vm_pindex_t pend, pstart;
1737 vm_size_t size;
1738
1739 object = fs->object;
1740 VM_OBJECT_ASSERT_UNLOCKED(object);
1739 VM_OBJECT_ASSERT_UNLOCKED(fs->object);
1741 first_object = fs->first_object;
1742 /* Neither fictitious nor unmanaged pages can be reclaimed. */
1743 if ((first_object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0) {
1744 VM_OBJECT_RLOCK(first_object);
1745 size = VM_FAULT_DONTNEED_MIN;
1746 if (MAXPAGESIZES > 1 && size < pagesizes[1])
1747 size = pagesizes[1];
1748 end = rounddown2(vaddr, size);

--- 433 unchanged lines hidden ---
1740 first_object = fs->first_object;
1741 /* Neither fictitious nor unmanaged pages can be reclaimed. */
1742 if ((first_object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0) {
1743 VM_OBJECT_RLOCK(first_object);
1744 size = VM_FAULT_DONTNEED_MIN;
1745 if (MAXPAGESIZES > 1 && size < pagesizes[1])
1746 size = pagesizes[1];
1747 end = rounddown2(vaddr, size);

--- 433 unchanged lines hidden ---