summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-05-08 21:35:51 +0000
committeralc <alc@FreeBSD.org>2010-05-08 21:35:51 +0000
commit59b934ef4016aab6f15404750fdcf3f77310bab1 (patch)
tree79d9a12a391cd10bf42c0efa85c0e4e51ff8c28b /sys/vm/vm_fault.c
parent40b44f9713de70170857e6291876dfce94b6ef43 (diff)
downloadFreeBSD-src-59b934ef4016aab6f15404750fdcf3f77310bab1.zip
FreeBSD-src-59b934ef4016aab6f15404750fdcf3f77310bab1.tar.gz
Minimize the scope of the page queues lock in vm_fault().
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index e5673de..e28c16c 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -306,7 +306,6 @@ RetryFault:;
* which is not what we want.
*/
vm_page_lock(fs.m);
- vm_page_lock_queues();
if ((fs.m->cow) &&
(fault_type & VM_PROT_WRITE) &&
(fs.object == fs.first_object)) {
@@ -337,6 +336,7 @@ RetryFault:;
* sleeping so that the page daemon is less
* likely to reclaim it.
*/
+ vm_page_lock_queues();
vm_page_flag_set(fs.m, PG_REFERENCED);
vm_page_unlock_queues();
vm_page_unlock(fs.m);
@@ -363,6 +363,7 @@ RetryFault:;
vm_object_deallocate(fs.first_object);
goto RetryFault;
}
+ vm_page_lock_queues();
vm_pageq_remove(fs.m);
vm_page_unlock_queues();
vm_page_unlock(fs.m);
OpenPOWER on IntegriCloud