summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2006-01-25 08:42:58 +0000
committerjeff <jeff@FreeBSD.org>2006-01-25 08:42:58 +0000
commit4981e49c6bb7c134083c3f1856036b9d4d9dd1e4 (patch)
tree1218b4b79f13665405a8c74a710f150b3c0ad16c /sys/vm
parenta4f310a8a6e1abf18065ed71a19ffed4eb5141dd (diff)
downloadFreeBSD-src-4981e49c6bb7c134083c3f1856036b9d4d9dd1e4.zip
FreeBSD-src-4981e49c6bb7c134083c3f1856036b9d4d9dd1e4.tar.gz
- Avoid calling vm_object_backing_scan() when collapsing an object when
the resident page count matches the object size. We know it fully backs its parent in this case. Reviewed by: acl, tegge Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index e5f26cb..60ede1d 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1693,7 +1693,9 @@ vm_object_collapse(vm_object_t object)
* If we do not entirely shadow the backing object,
* there is nothing we can do so we give up.
*/
- if (vm_object_backing_scan(object, OBSC_TEST_ALL_SHADOWED) == 0) {
+ if (object->resident_page_count != object->size &&
+ vm_object_backing_scan(object,
+ OBSC_TEST_ALL_SHADOWED) == 0) {
VM_OBJECT_UNLOCK(backing_object);
break;
}
OpenPOWER on IntegriCloud