Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_sendfile.c
Show First 20 Lines • Show All 382 Lines • ▼ Show 20 Lines | for (int i = 0; i < npages;) { | ||||
* | * | ||||
* Important feature of vm_pager_has_page() is the hint | * Important feature of vm_pager_has_page() is the hint | ||||
* stored in 'a', about how many pages we can pagein after | * stored in 'a', about how many pages we can pagein after | ||||
* this page in a single I/O. | * this page in a single I/O. | ||||
*/ | */ | ||||
if (!vm_pager_has_page(obj, OFF_TO_IDX(vmoff(i, off)), NULL, | if (!vm_pager_has_page(obj, OFF_TO_IDX(vmoff(i, off)), NULL, | ||||
&a)) { | &a)) { | ||||
pmap_zero_page(pa[i]); | pmap_zero_page(pa[i]); | ||||
pa[i]->valid = VM_PAGE_BITS_ALL; | vm_page_valid(pa[i]); | ||||
MPASS(pa[i]->dirty == 0); | MPASS(pa[i]->dirty == 0); | ||||
vm_page_xunbusy(pa[i]); | vm_page_xunbusy(pa[i]); | ||||
i++; | i++; | ||||
continue; | continue; | ||||
} | } | ||||
/* | /* | ||||
* We want to pagein as many pages as possible, limited only | * We want to pagein as many pages as possible, limited only | ||||
▲ Show 20 Lines • Show All 856 Lines • Show Last 20 Lines |