diff options
author | 2013-01-21 18:25:27 +0000 | |
---|---|---|
committer | 2013-01-21 18:25:27 +0000 | |
commit | 9a0f4dae1b5685b4efd1305391df2bc9e7f9a68c (patch) | |
tree | b0cf30cde87e64f15e2c56d37a95bbe1309052d9 /sys/uvm/uvm_pmemrange.c | |
parent | Use jmp, not jsr, to jump through registers. Doh! (diff) | |
download | wireguard-openbsd-9a0f4dae1b5685b4efd1305391df2bc9e7f9a68c.tar.xz wireguard-openbsd-9a0f4dae1b5685b4efd1305391df2bc9e7f9a68c.zip |
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/uvm_pmemrange.c')
-rw-r--r-- | sys/uvm/uvm_pmemrange.c | 14 |
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; } |