Index: sys/vm/vm_fault.c =================================================================== --- sys/vm/vm_fault.c +++ sys/vm/vm_fault.c @@ -497,6 +497,7 @@ static enum fault_status vm_fault_populate(struct faultstate *fs) { + struct pctrie_iter pages; vm_offset_t vaddr; vm_page_t m; vm_pindex_t map_first, map_last, pager_first, pager_last, pidx; @@ -623,9 +624,10 @@ pager_last); pager_last = map_last; } - for (pidx = pager_first, m = vm_page_lookup(fs->first_object, pidx); + vm_page_iter_init(&pages, fs->first_object); + for (pidx = pager_first, m = vm_radix_iter_lookup(&pages, pidx); pidx <= pager_last; - pidx += npages, m = TAILQ_NEXT(&m[npages - 1], listq)) { + pidx += npages, m = vm_radix_iter_stride(&pages, npages)) { vaddr = fs->entry->start + IDX_TO_OFF(pidx) - fs->entry->offset; KASSERT(m != NULL && m->pindex == pidx, ("%s: pindex mismatch", __func__));