summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_pool.c
diff options
context:
space:
mode:
authorariane <ariane@openbsd.org>2011-04-03 22:07:37 +0000
committerariane <ariane@openbsd.org>2011-04-03 22:07:37 +0000
commit205bb46da6adb871d9864633a3fa3527e6063831 (patch)
treeef3ff8925c818d5dac7d66e5cfc1707744455a53 /sys/kern/subr_pool.c
parentCall setlocale() to avoid display glitches in UTF-8 locales. (diff)
downloadwireguard-openbsd-205bb46da6adb871d9864633a3fa3527e6063831.tar.xz
wireguard-openbsd-205bb46da6adb871d9864633a3fa3527e6063831.zip
Helper functions for suspend.
Allow reclaiming pages from all pools. Allow zeroing all pages. Allocate the more equal pig. mlarking@ needs this. Not called yet. ok mlarkin@, theo@
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r--sys/kern/subr_pool.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index 2c201661948..c7d85ff0f23 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.99 2010/11/03 17:49:42 mikeb Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.100 2011/04/03 22:07:37 ariane Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -1069,6 +1069,18 @@ pool_reclaim(struct pool *pp)
return (1);
}
+/*
+ * Release all complete pages that have not been used recently
+ * from all pools.
+ */
+void
+pool_reclaim_all(void)
+{
+ struct pool *pp;
+ TAILQ_FOREACH(pp, &pool_head, pr_poollist)
+ pool_reclaim(pp);
+}
+
#ifdef DDB
#include <machine/db_machdep.h>
#include <ddb/db_interface.h>