diff options
author | 2014-09-26 05:43:14 +0000 | |
---|---|---|
committer | 2014-09-26 05:43:14 +0000 | |
commit | 5094a3733a9f5385cafc4652c2304a9369540f79 (patch) | |
tree | b52bf71a2f97cebb52d5f0b5019713fdf2b991f2 /sys/kern/subr_pool.c | |
parent | Bring back rev 1.249. Now that mp_setperf() has been fixed, it should be (diff) | |
download | wireguard-openbsd-5094a3733a9f5385cafc4652c2304a9369540f79.tar.xz wireguard-openbsd-5094a3733a9f5385cafc4652c2304a9369540f79.zip |
fix the calculation of the number of items to prime the pool with
in pool_setlowat.
this was stopping arm things from getting spare items into their
pmap entry pools, so things that really needed them in a delicate
part of boot were failing.
reported by rapha@
co-debugging with miod@
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r-- | sys/kern/subr_pool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index 4da74dbb56d..2f8c1366fcc 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.159 2014/09/23 19:54:47 miod Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.160 2014/09/26 05:43:14 dlg Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -855,7 +855,8 @@ pool_setlowat(struct pool *pp, int n) ? 0 : roundup(n, pp->pr_itemsperpage) / pp->pr_itemsperpage; - prime = pp->pr_nitems - n; + if (pp->pr_nitems < n) + prime = n - pp->pr_nitems; mtx_leave(&pp->pr_mtx); if (prime > 0) |