Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_fault.c
Show First 20 Lines • Show All 1,074 Lines • ▼ Show 20 Lines | if (fs.object->type != OBJT_DEFAULT) { | ||||
VM_FAULT_READ_DEFAULT; | VM_FAULT_READ_DEFAULT; | ||||
behind = ulmin(cluster_offset, | behind = ulmin(cluster_offset, | ||||
atop(vaddr - e_start)); | atop(vaddr - e_start)); | ||||
ahead = VM_FAULT_READ_DEFAULT - 1 - | ahead = VM_FAULT_READ_DEFAULT - 1 - | ||||
cluster_offset; | cluster_offset; | ||||
} | } | ||||
ahead = ulmin(ahead, atop(e_end - vaddr) - 1); | ahead = ulmin(ahead, atop(e_end - vaddr) - 1); | ||||
} | } | ||||
VM_OBJECT_WUNLOCK(fs.object); | |||||
rv = vm_pager_get_pages(fs.object, &fs.m, 1, | rv = vm_pager_get_pages(fs.object, &fs.m, 1, | ||||
&behind, &ahead); | &behind, &ahead); | ||||
VM_OBJECT_WLOCK(fs.object); | |||||
if (rv == VM_PAGER_OK) { | if (rv == VM_PAGER_OK) { | ||||
faultcount = behind + 1 + ahead; | faultcount = behind + 1 + ahead; | ||||
hardfault = true; | hardfault = true; | ||||
break; /* break to PAGE HAS BEEN FOUND */ | break; /* break to PAGE HAS BEEN FOUND */ | ||||
} | } | ||||
if (rv == VM_PAGER_ERROR) | if (rv == VM_PAGER_ERROR) | ||||
printf("vm_fault: pager read error, pid %d (%s)\n", | printf("vm_fault: pager read error, pid %d (%s)\n", | ||||
curproc->p_pid, curproc->p_comm); | curproc->p_pid, curproc->p_comm); | ||||
▲ Show 20 Lines • Show All 811 Lines • Show Last 20 Lines |