summaryrefslogtreecommitdiff
path: root/sys/kern/subr_pool.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-02-23 00:05:15 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-02-23 00:05:15 +0000
commit8467bf7f2964daea881e68f29d847185af2b1324 (patch)
tree9082a9d9383680296c149a2c8688240e1d6a5c5e /sys/kern/subr_pool.c
parenta9d3e7a69a34700f2394f6b6fd3ca7dd312b27bf (diff)
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.c5
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);