summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-05-06 18:58:32 +0000
committeralc <alc@FreeBSD.org>2010-05-06 18:58:32 +0000
commitfecc56fac19c93c470f79d1f557c149bd3c1e9b0 (patch)
treebd69226428af1da2a0d4fb0ab151f30836763046 /sys/vm/vm_fault.c
parentf26ccb52af3d824a0efc9843c9a039e07fcdcb8c (diff)
downloadFreeBSD-src-fecc56fac19c93c470f79d1f557c149bd3c1e9b0.zip
FreeBSD-src-fecc56fac19c93c470f79d1f557c149bd3c1e9b0.tar.gz
Eliminate page queues locking around most calls to vm_page_free().
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 2978f7f..ae1ee29 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -164,9 +164,7 @@ unlock_and_deallocate(struct faultstate *fs)
if (fs->object != fs->first_object) {
VM_OBJECT_LOCK(fs->first_object);
vm_page_lock(fs->first_m);
- vm_page_lock_queues();
vm_page_free(fs->first_m);
- vm_page_unlock_queues();
vm_page_unlock(fs->first_m);
vm_object_pip_wakeup(fs->first_object);
VM_OBJECT_UNLOCK(fs->first_object);
@@ -348,9 +346,7 @@ RetryFault:;
if (fs.object != fs.first_object) {
VM_OBJECT_LOCK(fs.first_object);
vm_page_lock(fs.first_m);
- vm_page_lock_queues();
vm_page_free(fs.first_m);
- vm_page_unlock_queues();
vm_page_unlock(fs.first_m);
vm_object_pip_wakeup(fs.first_object);
VM_OBJECT_UNLOCK(fs.first_object);
@@ -638,9 +634,7 @@ vnode_locked:
if (((fs.map != kernel_map) && (rv == VM_PAGER_ERROR)) ||
(rv == VM_PAGER_BAD)) {
vm_page_lock(fs.m);
- vm_page_lock_queues();
vm_page_free(fs.m);
- vm_page_unlock_queues();
vm_page_unlock(fs.m);
fs.m = NULL;
unlock_and_deallocate(&fs);
@@ -648,9 +642,7 @@ vnode_locked:
}
if (fs.object != fs.first_object) {
vm_page_lock(fs.m);
- vm_page_lock_queues();
vm_page_free(fs.m);
- vm_page_unlock_queues();
vm_page_unlock(fs.m);
fs.m = NULL;
/*
@@ -764,13 +756,11 @@ vnode_locked:
* We don't chase down the shadow chain
*/
fs.object == fs.first_object->backing_object) {
- vm_page_lock(fs.first_m);
- vm_page_lock_queues();
/*
* get rid of the unnecessary page
*/
+ vm_page_lock(fs.first_m);
vm_page_free(fs.first_m);
- vm_page_unlock_queues();
vm_page_unlock(fs.first_m);
/*
* grab the page and put it into the
OpenPOWER on IntegriCloud