diff options
| author | 2002-01-23 00:39:46 +0000 | |
|---|---|---|
| committer | 2002-01-23 00:39:46 +0000 | |
| commit | c5790e3dc873e45d340e291e969620ee2c2b5833 (patch) | |
| tree | 2960fda2237ce91790ef97f7088167ac23b1b81e /sys/kern/subr_extent.c | |
| parent | open for writing only if needed so, accept multiple var assignments for -w; from meself and Vladimir Popov <jumbo@narod.ru> (diff) | |
| download | wireguard-openbsd-c5790e3dc873e45d340e291e969620ee2c2b5833.tar.xz wireguard-openbsd-c5790e3dc873e45d340e291e969620ee2c2b5833.zip | |
Pool deals fairly well with physical memory shortage, but it doesn't deal
well (not at all) with shortages of the vm_map where the pages are mapped
(usually kmem_map).
Try to deal with it:
- group all information the backend allocator for a pool in a separate
struct. The pool will only have a pointer to that struct.
- change the pool_init API to reflect that.
- link all pools allocating from the same allocator on a linked list.
- Since an allocator is responsible to wait for physical memory it will
only fail (waitok) when it runs out of its backing vm_map, carefully
drain pools using the same allocator so that va space is freed.
(see comments in code for caveats and details).
- change pool_reclaim to return if it actually succeeded to free some
memory, use that information to make draining easier and more efficient.
- get rid of PR_URGENT, noone uses it.
Diffstat (limited to 'sys/kern/subr_extent.c')
| -rw-r--r-- | sys/kern/subr_extent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_extent.c b/sys/kern/subr_extent.c index 1b879c6755c..be00d755fc2 100644 --- a/sys/kern/subr_extent.c +++ b/sys/kern/subr_extent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_extent.c,v 1.18 2001/08/06 11:19:26 art Exp $ */ +/* $OpenBSD: subr_extent.c,v 1.19 2002/01/23 00:39:47 art Exp $ */ /* $NetBSD: subr_extent.c,v 1.7 1996/11/21 18:46:34 cgd Exp $ */ /*- @@ -114,7 +114,7 @@ extent_pool_init(void) if (!inited) { pool_init(&ex_region_pl, sizeof(struct extent_region), 0, 0, 0, - "extentpl", 0, 0, 0, 0); + "extentpl", NULL); inited = 1; } } |
