diff options
author | 2002-02-23 00:05:14 +0000 | |
---|---|---|
committer | 2002-02-23 00:05:14 +0000 | |
commit | 4eed8d9d0eaab829ad55127990f0aa76ed79fcf4 (patch) | |
tree | 3f92222a4a17babb459556d16442cfe989ed29fc /sys/kern/subr_pool.c | |
parent | Pools that are only used in the ioctls can use the nointr allocator. (diff) | |
download | wireguard-openbsd-4eed8d9d0eaab829ad55127990f0aa76ed79fcf4.tar.xz wireguard-openbsd-4eed8d9d0eaab829ad55127990f0aa76ed79fcf4.zip |
If the allocator has the PA_WANT flag set, return whole pages immediately.
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 c796341e6ed..701332a3837 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.25 2002/02/23 00:03:14 art Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.26 2002/02/23 00:05:14 art Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -942,7 +942,8 @@ pool_do_put(struct pool *pp, void *v) */ if (ph->ph_nmissing == 0) { pp->pr_nidle++; - if (pp->pr_npages > pp->pr_maxpages) { + if (pp->pr_npages > pp->pr_maxpages || + (pp->pr_alloc->pa_flags & PA_WANT)) { pr_rmpage(pp, ph, NULL); } else { TAILQ_REMOVE(&pp->pr_pagelist, ph, ph_pagelist); |