If a page belonging a reservation is cached, then mark the reservation so

that it will be freed to the cache pool rather than the default pool.
Otherwise, the cached pages within the reservation may be recycled sooner
than necessary.

Reported by:	Andrey Zonov
This commit is contained in:
Alan Cox 2012-04-08 17:00:46 +00:00
parent 2b028c25d3
commit 908e3da10e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234038

View File

@ -652,11 +652,13 @@ vm_reserv_free_page(vm_page_t m)
mtx_assert(&vm_page_queue_free_mtx, MA_OWNED);
rv = vm_reserv_from_page(m);
if (rv->object != NULL) {
vm_reserv_depopulate(rv);
return (TRUE);
}
return (FALSE);
if (rv->object == NULL)
return (FALSE);
if ((m->flags & PG_CACHED) != 0 && m->pool != VM_FREEPOOL_CACHE)
vm_phys_set_pool(VM_FREEPOOL_CACHE, rv->pages,
VM_LEVEL_0_ORDER);
vm_reserv_depopulate(rv);
return (TRUE);
}
/*