diff options
author | alc <alc@FreeBSD.org> | 2004-03-10 04:44:43 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-03-10 04:44:43 +0000 |
commit | dbdc40242102e22430f96a48b45a6e6722d5e48c (patch) | |
tree | 8ad9011290ea4c0de6e223b76178a470536ccfb7 /sys/vm/uma_core.c | |
parent | fea945fb73bcbd8e5124d42bf3f62632c38aa171 (diff) | |
download | FreeBSD-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/uma_core.c')
-rw-r--r-- | sys/vm/uma_core.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index fb5f5fc..f693540 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2052,17 +2052,7 @@ void uma_large_free(uma_slab_t slab) { vsetobj((vm_offset_t)slab->us_data, kmem_object); - /* - * XXX: We get a lock order reversal if we don't have Giant: - * vm_map_remove (locks system map) -> vm_map_delete -> - * vm_map_entry_unwire -> vm_fault_unwire -> mtx_lock(&Giant) - */ - if (!mtx_owned(&Giant)) { - mtx_lock(&Giant); - page_free(slab->us_data, slab->us_size, slab->us_flags); - mtx_unlock(&Giant); - } else - page_free(slab->us_data, slab->us_size, slab->us_flags); + page_free(slab->us_data, slab->us_size, slab->us_flags); uma_zfree_internal(slabzone, slab, NULL, 0); } |