diff options
author | alc <alc@FreeBSD.org> | 2008-03-16 17:37:19 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2008-03-16 17:37:19 +0000 |
commit | 0de51cf04743b1a9bde51b0b1738741bff8d884f (patch) | |
tree | a72e03a5e42e813c77a096c70a32cc8f7d064dea /sys/vm | |
parent | 6a68218ce149461bb488264f5f28b9dde97cab3e (diff) | |
download | FreeBSD-src-0de51cf04743b1a9bde51b0b1738741bff8d884f.zip FreeBSD-src-0de51cf04743b1a9bde51b0b1738741bff8d884f.tar.gz |
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.)
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_fault.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |