diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2006-01-25 08:42:58 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2006-01-25 08:42:58 +0000 |
commit | df59a0fee7a181161b8e3806744ad78b6d30bec4 (patch) | |
tree | 1218b4b79f13665405a8c74a710f150b3c0ad16c | |
parent | 411babc618fdd132a304094931fccf1577821c16 (diff) | |
download | src-df59a0fee7a181161b8e3806744ad78b6d30bec4.tar.gz src-df59a0fee7a181161b8e3806744ad78b6d30bec4.zip |
- 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.
Notes
Notes:
svn path=/head/; revision=154805
-rw-r--r-- | sys/vm/vm_object.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index e5f26cb36669..60ede1d397c5 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; } |