Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_bio.c
Show First 20 Lines • Show All 4,920 Lines • ▼ Show 20 Lines | KASSERT(to - from <= maxbcachebuf, | ||||
bp, (uintmax_t)from, (uintmax_t)to, maxbcachebuf)); | bp, (uintmax_t)from, (uintmax_t)to, maxbcachebuf)); | ||||
for (pg = from; pg < to; pg += PAGE_SIZE, index++) { | for (pg = from; pg < to; pg += PAGE_SIZE, index++) { | ||||
/* | /* | ||||
* note: must allocate system pages since blocking here | * note: must allocate system pages since blocking here | ||||
* could interfere with paging I/O, no matter which | * could interfere with paging I/O, no matter which | ||||
* process we are. | * process we are. | ||||
*/ | */ | ||||
p = vm_page_alloc(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | | p = vm_page_alloc_noobj(VM_ALLOC_SYSTEM | VM_ALLOC_WIRED | | ||||
VM_ALLOC_WIRED | VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT) | | VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT) | VM_ALLOC_WAITOK); | ||||
VM_ALLOC_WAITOK); | |||||
pmap_qenter(pg, &p, 1); | pmap_qenter(pg, &p, 1); | ||||
bp->b_pages[index] = p; | bp->b_pages[index] = p; | ||||
} | } | ||||
bp->b_npages = index; | bp->b_npages = index; | ||||
} | } | ||||
/* Return pages associated with this buf to the vm system */ | /* Return pages associated with this buf to the vm system */ | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 614 Lines • Show Last 20 Lines |