summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-03-08 03:54:36 +0000
committeralc <alc@FreeBSD.org>2004-03-08 03:54:36 +0000
commit81dacfa43ef94cd472f712f702b7674fa45b27ee (patch)
tree5ee0b956aa87071d29a221727096deb4a4c0e0d5 /sys/vm/vm_object.c
parentfc9a6b748e010eddfcd67121ee570dbc2124c2e9 (diff)
downloadFreeBSD-src-81dacfa43ef94cd472f712f702b7674fa45b27ee.zip
FreeBSD-src-81dacfa43ef94cd472f712f702b7674fa45b27ee.tar.gz
Implement a work around for the deadlock avoidance case in
vm_object_deallocate() so that it doesn't spin forever either. Submitted by: bde
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 116a075..965666e 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -495,6 +495,13 @@ vm_object_deallocate(vm_object_t object)
*/
object->ref_count++;
VM_OBJECT_UNLOCK(object);
+ /*
+ * More likely than not the thread
+ * holding robject's lock has lower
+ * priority than the current thread.
+ * Let the lower priority thread run.
+ */
+ tsleep(&proc0, PVM, "vmo_de", 1);
continue;
}
if ((robject->handle == NULL) &&
OpenPOWER on IntegriCloud