summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2013-01-21 18:25:28 +0000
committerBob Beck <beck@cvs.openbsd.org>2013-01-21 18:25:28 +0000
commit1dd0c38510c71a37f7714361d123b11f5788a5e7 (patch)
tree8dcdd5aeafeec7bf53e730b5f59762587b9e6d23 /sys/uvm
parent63a3b4f46c263451e882410f314443efbe9b0328 (diff)
Stop hiding when this is failing - make this as obvious as it is
when uvm_wait gets hit from the pagedaemon. - code copied from uvm_wait. ok guenther@, kettenis@
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_pmemrange.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/uvm/uvm_pmemrange.c b/sys/uvm/uvm_pmemrange.c
index bf5ec5c78c7..2b7bc632a62 100644
--- a/sys/uvm/uvm_pmemrange.c
+++ b/sys/uvm/uvm_pmemrange.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pmemrange.c,v 1.34 2012/01/05 17:49:45 ariane Exp $ */
+/* $OpenBSD: uvm_pmemrange.c,v 1.35 2013/01/21 18:25:27 beck Exp $ */
/*
* Copyright (c) 2009, 2010 Ariane van der Steldt <ariane@stack.nl>
@@ -1881,11 +1881,17 @@ uvm_wait_pla(paddr_t low, paddr_t high, paddr_t size, int failok)
struct uvm_pmalloc pma;
const char *wmsg = "pmrwait";
- /*
- * Prevent deadlock.
- */
if (curproc == uvm.pagedaemon_proc) {
+ /*
+ * XXX detect pagedaemon deadlock - see comment in
+ * uvm_wait(), as this is exactly the same issue.
+ */
+ printf("pagedaemon: wait_pla deadlock detected!\n");
msleep(&uvmexp.free, &uvm.fpageqlock, PVM, wmsg, hz >> 3);
+#if defined(DEBUG)
+ /* DEBUG: panic so we can debug it */
+ panic("wait_pla pagedaemon deadlock");
+#endif
return 0;
}