Index: sys/vm/vm_page.c =================================================================== --- sys/vm/vm_page.c +++ sys/vm/vm_page.c @@ -2185,6 +2185,10 @@ struct vm_domain *vmd; vm_page_t m_ret; + /* + * Can we allocate the pages without the number of free pages falling + * below the lower bound for the allocation class? + */ vmd = VM_DOMAIN(domain); if (!vm_domain_allocate(vmd, req, npages)) return (NULL); @@ -2238,11 +2242,6 @@ mpred = vm_radix_lookup_le(&object->rtree, pindex); KASSERT(mpred == NULL || mpred->pindex != pindex, ("vm_page_alloc_contig: pindex already allocated")); - - /* - * Can we allocate the pages without the number of free pages falling - * below the lower bound for the allocation class? - */ for (;;) { #if VM_NRESERVLEVEL > 0 /*