summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_glue.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2002-03-18 15:08:09 +0000
committergreen <green@FreeBSD.org>2002-03-18 15:08:09 +0000
commit353ca8aae74c4758d7ec344445ff769de079e600 (patch)
tree03fcb7624947120aa4fef84d5f6a294e47e7965f /sys/vm/vm_glue.c
parent97406621603cd326708524776a2b5e2c5d8c1f75 (diff)
downloadFreeBSD-src-353ca8aae74c4758d7ec344445ff769de079e600.zip
FreeBSD-src-353ca8aae74c4758d7ec344445ff769de079e600.tar.gz
Back out the modification of vm_map locks from lockmgr to sx locks. The
best path forward now is likely to change the lockmgr locks to simple sleep mutexes, then see if any extra contention it generates is greater than removed overhead of managing local locking state information, cost of extra calls into lockmgr, etc. Additionally, making the vm_map lock a mutex and respecting it properly will put us much closer to not needing Giant magic in vm.
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r--sys/vm/vm_glue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 75bd9b42..efbe38a 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -560,7 +560,9 @@ retry:
* data structures there is a
* possible deadlock.
*/
- if (vm_map_try_lock(&vm->vm_map)) {
+ if (lockmgr(&vm->vm_map.lock,
+ LK_EXCLUSIVE | LK_NOWAIT,
+ NULL, curthread)) {
vmspace_free(vm);
PROC_UNLOCK(p);
goto nextproc;
OpenPOWER on IntegriCloud