diff options
author | attilio <attilio@FreeBSD.org> | 2013-06-04 22:47:01 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-06-04 22:47:01 +0000 |
commit | 7816c7bc23552e922dd5465a11394c5f8d01eb01 (patch) | |
tree | ed03fd41d1178c871c5f881bc7bd924bda7c3d38 /sys/vm | |
parent | 9a638117821b8de32c1f05d7244562702b4155b6 (diff) | |
download | FreeBSD-src-7816c7bc23552e922dd5465a11394c5f8d01eb01.zip FreeBSD-src-7816c7bc23552e922dd5465a11394c5f8d01eb01.tar.gz |
In vm_object_split(), busy and consequently unbusy the pages only when
swap_pager_copy() is invoked, otherwise there is no reason to do so.
This will eliminate the necessity to busy pages most of the times.
Sponsored by: EMC / Isilon storage division
Reviewed by: alc
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 08e4e15..9ddd141 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1390,7 +1390,8 @@ retry: vm_page_rename(m, new_object, idx); vm_page_unlock(m); /* page automatically made dirty by rename and cache handled */ - vm_page_busy(m); + if (orig_object->type == OBJT_SWAP) + vm_page_busy(m); } if (orig_object->type == OBJT_SWAP) { /* @@ -1398,6 +1399,8 @@ retry: * and new_object's locks are released and reacquired. */ swap_pager_copy(orig_object, new_object, offidxstart, 0); + TAILQ_FOREACH(m, &new_object->memq, listq) + vm_page_wakeup(m); /* * Transfer any cached pages from orig_object to new_object. @@ -1413,8 +1416,6 @@ retry: new_object); } VM_OBJECT_WUNLOCK(orig_object); - TAILQ_FOREACH(m, &new_object->memq, listq) - vm_page_wakeup(m); VM_OBJECT_WUNLOCK(new_object); entry->object.vm_object = new_object; entry->offset = 0LL; |