From 428a9d0c41ac6e6a1e3b34fe87ab6ef38f3764cb Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Wed, 23 Jan 2002 00:39:49 +0000 Subject: 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. --- sys/dev/ic/ncr53c9x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/ic/ncr53c9x.c') diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index 71801c15489..7f468eee780 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr53c9x.c,v 1.11 2001/12/17 23:13:41 nordin Exp $ */ +/* $OpenBSD: ncr53c9x.c,v 1.12 2002/01/23 00:39:47 art Exp $ */ /* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */ /* @@ -376,7 +376,7 @@ ncr53c9x_init(sc, doreset) if (!ecb_pool_initialized) { /* All instances share this pool */ pool_init(&ecb_pool, sizeof(struct ncr53c9x_ecb), 0, 0, 0, - "ncr53c9x_ecb", 0, NULL, NULL, 0); + "ncr53c9x_ecb", NULL); ecb_pool_initialized = 1; } -- cgit v1.2.3