Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/uipc_shm.c
Show First 20 Lines • Show All 498 Lines • ▼ Show 20 Lines | retry: | ||||
m = vm_page_grab(object, idx, VM_ALLOC_NOCREAT); | m = vm_page_grab(object, idx, VM_ALLOC_NOCREAT); | ||||
if (m != NULL) { | if (m != NULL) { | ||||
MPASS(vm_page_all_valid(m)); | MPASS(vm_page_all_valid(m)); | ||||
} else if (vm_pager_has_page(object, idx, NULL, NULL)) { | } else if (vm_pager_has_page(object, idx, NULL, NULL)) { | ||||
m = vm_page_alloc(object, idx, | m = vm_page_alloc(object, idx, | ||||
VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL); | VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL); | ||||
if (m == NULL) | if (m == NULL) | ||||
goto retry; | goto retry; | ||||
vm_object_pip_add(object, 1); | |||||
VM_OBJECT_WUNLOCK(object); | |||||
rv = vm_pager_get_pages(object, &m, 1, NULL, | rv = vm_pager_get_pages(object, &m, 1, NULL, | ||||
NULL); | NULL); | ||||
VM_OBJECT_WLOCK(object); | |||||
vm_object_pip_wakeup(object); | |||||
if (rv == VM_PAGER_OK) { | if (rv == VM_PAGER_OK) { | ||||
/* | /* | ||||
* Since the page was not resident, | * Since the page was not resident, | ||||
* and therefore not recently | * and therefore not recently | ||||
* accessed, immediately enqueue it | * accessed, immediately enqueue it | ||||
* for asynchronous laundering. The | * for asynchronous laundering. The | ||||
* current operation is not regarded | * current operation is not regarded | ||||
* as an access. | * as an access. | ||||
▲ Show 20 Lines • Show All 1,031 Lines • Show Last 20 Lines |