summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-12-18 04:39:15 +0000
committerAlan Cox <alc@FreeBSD.org>2002-12-18 04:39:15 +0000
commitbd82dc7460168edb71670438bdf1996939d09a6a (patch)
tree971b7fde5b5fc14b6e0859976319df7989ea2f55
parentb365ea9e302e0ef8a843912ab6ad8a7d0bfa27fe (diff)
Notes
-rw-r--r--sys/vm/vm_object.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 22d462c9e831..550b5d02a357 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -846,14 +846,15 @@ vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration,
vm_page_t ma[vm_pageout_page_count];
s = splvm();
+ vm_page_lock_queues();
pi = p->pindex;
- while (vm_page_sleep_busy(p, TRUE, "vpcwai")) {
+ while (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) {
if (object->generation != curgeneration) {
splx(s);
return(0);
}
+ vm_page_lock_queues();
}
- vm_page_lock_queues();
maxf = 0;
for(i = 1; i < vm_pageout_page_count; i++) {
vm_page_t tp;
@@ -1248,7 +1249,9 @@ vm_object_split(vm_map_entry_t entry)
vm_page_unlock_queues();
vm_page_rename(m, new_object, idx);
/* page automatically made dirty by rename and cache handled */
+ vm_page_lock_queues();
vm_page_busy(m);
+ vm_page_unlock_queues();
}
if (orig_object->type == OBJT_SWAP) {
vm_object_pip_add(orig_object, 1);