vm_fault.c (a8b0f1009d9cd702d9ef47f8aef915dd4c74d6e2) | vm_fault.c (b5ab20c0669bff9ff0887a7afbce96919e37bb43) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 1046 unchanged lines hidden (view full) --- 1055 vm_page_t m, m_next; 1056 vm_pindex_t pend, pstart; 1057 vm_size_t size; 1058 1059 object = fs->object; 1060 VM_OBJECT_ASSERT_WLOCKED(object); 1061 first_object = fs->first_object; 1062 if (first_object != object) { | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 1046 unchanged lines hidden (view full) --- 1055 vm_page_t m, m_next; 1056 vm_pindex_t pend, pstart; 1057 vm_size_t size; 1058 1059 object = fs->object; 1060 VM_OBJECT_ASSERT_WLOCKED(object); 1061 first_object = fs->first_object; 1062 if (first_object != object) { |
1063 if (!VM_OBJECT_TRYRLOCK(first_object)) { | 1063 if (!VM_OBJECT_TRYWLOCK(first_object)) { |
1064 VM_OBJECT_WUNLOCK(object); | 1064 VM_OBJECT_WUNLOCK(object); |
1065 VM_OBJECT_RLOCK(first_object); | 1065 VM_OBJECT_WLOCK(first_object); |
1066 VM_OBJECT_WLOCK(object); 1067 } 1068 } 1069 /* Neither fictitious nor unmanaged pages can be reclaimed. */ 1070 if ((first_object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0) { 1071 size = VM_FAULT_DONTNEED_MIN; 1072 if (MAXPAGESIZES > 1 && size < pagesizes[1]) 1073 size = pagesizes[1]; --- 18 unchanged lines hidden (view full) --- 1092 vm_page_lock(m); 1093 if (m->hold_count == 0 && m->wire_count == 0) 1094 vm_page_advise(m, MADV_DONTNEED); 1095 vm_page_unlock(m); 1096 } 1097 } 1098 } 1099 if (first_object != object) | 1066 VM_OBJECT_WLOCK(object); 1067 } 1068 } 1069 /* Neither fictitious nor unmanaged pages can be reclaimed. */ 1070 if ((first_object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0) { 1071 size = VM_FAULT_DONTNEED_MIN; 1072 if (MAXPAGESIZES > 1 && size < pagesizes[1]) 1073 size = pagesizes[1]; --- 18 unchanged lines hidden (view full) --- 1092 vm_page_lock(m); 1093 if (m->hold_count == 0 && m->wire_count == 0) 1094 vm_page_advise(m, MADV_DONTNEED); 1095 vm_page_unlock(m); 1096 } 1097 } 1098 } 1099 if (first_object != object) |
1100 VM_OBJECT_RUNLOCK(first_object); | 1100 VM_OBJECT_WUNLOCK(first_object); |
1101} 1102 1103/* 1104 * vm_fault_prefault provides a quick way of clustering 1105 * pagefaults into a processes address space. It is a "cousin" 1106 * of vm_map_pmap_enter, except it runs at page fault time instead 1107 * of mmap time. 1108 */ --- 499 unchanged lines hidden --- | 1101} 1102 1103/* 1104 * vm_fault_prefault provides a quick way of clustering 1105 * pagefaults into a processes address space. It is a "cousin" 1106 * of vm_map_pmap_enter, except it runs at page fault time instead 1107 * of mmap time. 1108 */ --- 499 unchanged lines hidden --- |