From 0de51cf04743b1a9bde51b0b1738741bff8d884f Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 16 Mar 2008 17:37:19 +0000 Subject: 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.) --- sys/vm/vm_fault.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/vm/vm_fault.c') diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 7129639..6950c82 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -484,7 +484,8 @@ readrest: 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 @@ readrest: break; if (mt->busy || (mt->oflags & VPO_BUSY) || - (mt->flags & PG_UNMANAGED) || mt->hold_count || mt->wire_count) continue; -- cgit v1.1