summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-12-23 20:16:11 +0000
committeralc <alc@FreeBSD.org>2004-12-23 20:16:11 +0000
commita618275b13403f9bf275545c254a6ad694a98ac7 (patch)
tree69d2684272055b8e783776f57abaa83628519595 /sys/vm/vm_fault.c
parent8aad93579025896f709dbf6fcddb19ff74b73640 (diff)
downloadFreeBSD-src-a618275b13403f9bf275545c254a6ad694a98ac7.zip
FreeBSD-src-a618275b13403f9bf275545c254a6ad694a98ac7.tar.gz
Modify pmap_enter_quick() so that it expects the page queues to be locked
on entry and it assumes the responsibility for releasing the page queues lock if it must sleep. Remove a bogus comment from pmap_enter_quick(). Using the first change, modify vm_map_pmap_enter() so that the page queues lock is acquired and released once, rather than each time that a page is mapped.
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 6fac17c..4f6d1e9 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -977,12 +977,11 @@ vm_fault_prefault(pmap_t pmap, vm_offset_t addra, vm_map_entry_t entry)
(m->busy == 0) &&
(m->flags & (PG_BUSY | PG_FICTITIOUS)) == 0) {
- if ((m->queue - m->pc) == PQ_CACHE) {
- vm_page_lock_queues();
+ vm_page_lock_queues();
+ if ((m->queue - m->pc) == PQ_CACHE)
vm_page_deactivate(m);
- vm_page_unlock_queues();
- }
mpte = pmap_enter_quick(pmap, addr, m, mpte);
+ vm_page_unlock_queues();
}
VM_OBJECT_UNLOCK(lobject);
}
OpenPOWER on IntegriCloud