summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_pool.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-07-10 07:50:27 +0000
committertedu <tedu@openbsd.org>2014-07-10 07:50:27 +0000
commit54d86b476bf804fb354033455bdbc3be7ba37099 (patch)
tree38e6549868228e14261cf86f1507e7f4cf7ce902 /sys/kern/subr_pool.c
parentBN_free, BN_clear_free, BN_CTX_free, BN_BLINDING_free and BN_MONT_CTX_free (diff)
downloadwireguard-openbsd-54d86b476bf804fb354033455bdbc3be7ba37099.tar.xz
wireguard-openbsd-54d86b476bf804fb354033455bdbc3be7ba37099.zip
hide the biglock thrashing under pool_debug so it can be turned off
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r--sys/kern/subr_pool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index 64dd72bbe16..09e17f38e98 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.136 2014/07/03 07:47:56 guenther Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.137 2014/07/10 07:50:27 tedu Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -485,7 +485,7 @@ pool_get(struct pool *pp, int flags)
if (pool_debug == 2)
yield();
#endif
- if (!cold) {
+ if (!cold && pool_debug) {
KERNEL_UNLOCK();
KERNEL_LOCK();
}