The calls to vm_radix_lookup_ge() by vm_reserv_alloc_{contig,page}() can
be eliminated. If the calls to vm_radix_lookup_le() return NULL, then the page at the head of the object's memq must be the page with the least pindex greater than the specified pindex. Reviewed by: attilio Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
8a01505f5e
commit
6cbd8f24b9
@ -352,7 +352,7 @@ vm_reserv_alloc_contig(vm_object_t object, vm_pindex_t pindex, u_long npages,
|
||||
goto found;
|
||||
msucc = TAILQ_NEXT(mpred, listq);
|
||||
} else
|
||||
msucc = vm_radix_lookup_ge(&object->rtree, pindex);
|
||||
msucc = TAILQ_FIRST(&object->memq);
|
||||
if (msucc != NULL) {
|
||||
KASSERT(msucc->pindex > pindex,
|
||||
("vm_reserv_alloc_page: pindex already allocated"));
|
||||
@ -507,7 +507,7 @@ vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex)
|
||||
goto found;
|
||||
msucc = TAILQ_NEXT(mpred, listq);
|
||||
} else
|
||||
msucc = vm_radix_lookup_ge(&object->rtree, pindex);
|
||||
msucc = TAILQ_FIRST(&object->memq);
|
||||
if (msucc != NULL) {
|
||||
KASSERT(msucc->pindex > pindex,
|
||||
("vm_reserv_alloc_page: pindex already allocated"));
|
||||
|
Loading…
Reference in New Issue
Block a user