summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-03-10 04:44:43 +0000
committeralc <alc@FreeBSD.org>2004-03-10 04:44:43 +0000
commitdbdc40242102e22430f96a48b45a6e6722d5e48c (patch)
tree8ad9011290ea4c0de6e223b76178a470536ccfb7 /sys/vm/vm_fault.c
parentfea945fb73bcbd8e5124d42bf3f62632c38aa171 (diff)
downloadFreeBSD-src-dbdc40242102e22430f96a48b45a6e6722d5e48c.zip
FreeBSD-src-dbdc40242102e22430f96a48b45a6e6722d5e48c.tar.gz
- Make the acquisition of Giant in vm_fault_unwire() conditional on the
pmap. For the kernel pmap, Giant is not required. In general, for other pmaps, Giant is required by i386's pmap_pte() implementation. Specifically, the use of PMAP2/PADDR2 is synchronized by Giant. Note: In principle, updates to the kernel pmap's wired count could be lost without Giant. However, in practice, we never use the kernel pmap's wired count. This will be resolved when pmap locking appears. - With the above change, cpu_thread_clean() and uma_large_free() need not acquire Giant. (The first case is simply the revival of i386/i386/vm_machdep.c's revision 1.226 by peter.)
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 602b659..fded099 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -1081,7 +1081,8 @@ vm_fault_unwire(map, start, end)
pmap = vm_map_pmap(map);
- mtx_lock(&Giant);
+ if (pmap != kernel_pmap)
+ mtx_lock(&Giant);
/*
* Since the pages are wired down, we must be able to get their
* mappings from the physical map system.
@@ -1095,7 +1096,8 @@ vm_fault_unwire(map, start, end)
vm_page_unlock_queues();
}
}
- mtx_unlock(&Giant);
+ if (pmap != kernel_pmap)
+ mtx_unlock(&Giant);
}
/*
OpenPOWER on IntegriCloud