| 996 | } |
| 997 | |
| 998 | static bool |
| 999 | vm_fault_next(struct faultstate *fs) |
| 1000 | { |
| 1001 | vm_object_t next_object; |
| 1002 | |
| 1003 | /* |
| 1004 | * The requested page does not exist at this object/ |
| 1005 | * offset. Remove the invalid page from the object, |
| 1006 | * waking up anyone waiting for it, and continue on to |
| 1007 | * the next object. However, if this is the top-level |
| 1008 | * object, we must leave the busy page in place to |
| 1009 | * prevent another process from rushing past us, and |
| 1010 | * inserting the page in that object at the same time |
| 1011 | * that we are. |
| 1012 | */ |
| 1013 | if (fs->object == fs->first_object) { |
| 1014 | fs->first_m = fs->m; |
| 1015 | fs->m = NULL; |
| 1016 | } else |
| 1017 | fault_page_free(&fs->m); |
| 1018 | |
| 1019 | /* |
| 1020 | * Move on to the next object. Lock the next object before |
| 1021 | * unlocking the current one. |
| 1022 | */ |
| 1023 | VM_OBJECT_ASSERT_WLOCKED(fs->object); |
| 1024 | next_object = fs->object->backing_object; |
| 1025 | if (next_object == NULL) |
| 1026 | return (false); |
| 1027 | MPASS(fs->first_m != NULL); |
| 1028 | KASSERT(fs->object != next_object, ("object loop %p", next_object)); |
| 1029 | VM_OBJECT_WLOCK(next_object); |
| 1030 | vm_object_pip_add(next_object, 1); |
| 1031 | if (fs->object != fs->first_object) |
| 1032 | vm_object_pip_wakeup(fs->object); |
| 1033 | fs->pindex += OFF_TO_IDX(fs->object->backing_object_offset); |
| 1034 | VM_OBJECT_WUNLOCK(fs->object); |
| 1035 | fs->object = next_object; |
| 1036 | |
| 1037 | return (true); |
| 1038 | } |
| 1039 | |
| 1040 | static void |
| 1041 | vm_fault_zerofill(struct faultstate *fs) |
no test coverage detected