summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-20 13:43:01 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-14 14:45:06 +0200
commitdaf6353b9fd988e5d35657b1aaf21d5b69ba0c4f (patch)
treeffeccc7ce4973e35bed73a0be2c5fb6d0ee72865
parentb51f047c28142cdfb7b24641006d0afdcf399292 (diff)
yyy avoid unlocking while zeroing or copying
-rw-r--r--vm/vm_fault.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/vm/vm_fault.c b/vm/vm_fault.c
index 40d1cbc..1ed9e03 100644
--- a/vm/vm_fault.c
+++ b/vm/vm_fault.c
@@ -462,15 +462,16 @@ vm_fault_return_t vm_fault_page(
m = real_m;
/*
- * Drop the lock while zero filling
- * page. Then break because this
- * is the page we wanted. Checking
- * the page lock is a waste of time;
- * this page was either absent or
- * newly allocated -- in both cases
- * it can't be page locked by a pager.
+ * Zero fill the page. Then
+ * break because this is the
+ * page we wanted. Checking
+ * the page lock is a waste
+ * of time; this page was
+ * either absent or newly
+ * allocated -- in both cases
+ * it can't be page locked by
+ * a pager.
*/
- vm_object_unlock(object);
vm_page_zero_fill(m);
@@ -478,7 +479,6 @@ vm_fault_return_t vm_fault_page(
vm_stat.zero_fill_count++;
current_task()->zero_fills++;
- vm_object_lock(object);
pmap_clear_modify(m->phys_addr);
break;
} else {
@@ -755,12 +755,10 @@ vm_fault_return_t vm_fault_page(
return(VM_FAULT_MEMORY_SHORTAGE);
}
- vm_object_unlock(object);
vm_page_zero_fill(m);
vm_stat_sample(SAMPLED_PC_VM_ZFILL_FAULTS);
vm_stat.zero_fill_count++;
current_task()->zero_fills++;
- vm_object_lock(object);
pmap_clear_modify(m->phys_addr);
break;
}
@@ -841,9 +839,7 @@ vm_fault_return_t vm_fault_page(
return(VM_FAULT_MEMORY_SHORTAGE);
}
- vm_object_unlock(object);
vm_page_copy(m, copy_m);
- vm_object_lock(object);
/*
* If another map is truly sharing this