Simplify the inner loop of vm_fault()'s delete-behind heuristic.
Instead of checking each page for PG_UNMANAGED, perform a one-time check whether the object is OBJT_PHYS. (PG_UNMANAGED pages only belong to OBJT_PHYS objects.)
This commit is contained in:
parent
b12455f34e
commit
ec96dca788
@ -484,7 +484,8 @@ RetryFault:;
|
||||
fs.pindex < fs.entry->lastr + VM_FAULT_READ)) &&
|
||||
(fs.first_object == fs.object ||
|
||||
(is_first_object_locked = VM_OBJECT_TRYLOCK(fs.first_object))) &&
|
||||
fs.first_object->type != OBJT_DEVICE) {
|
||||
fs.first_object->type != OBJT_DEVICE &&
|
||||
fs.first_object->type != OBJT_PHYS) {
|
||||
vm_pindex_t firstpindex, tmppindex;
|
||||
|
||||
if (fs.first_pindex < 2 * VM_FAULT_READ)
|
||||
@ -508,7 +509,6 @@ RetryFault:;
|
||||
break;
|
||||
if (mt->busy ||
|
||||
(mt->oflags & VPO_BUSY) ||
|
||||
(mt->flags & PG_UNMANAGED) ||
|
||||
mt->hold_count ||
|
||||
mt->wire_count)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user