diff options
| author | thorpej <thorpej@NetBSD.org> | 2002-03-08 20:48:27 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2002-03-08 20:48:27 +0000 |
| commit | a180cee23b473847ef3a3bebc8e5c778b4bf97cd (patch) | |
| tree | baa8c819b3912e1cee37a1c058dd5c3070f76622 /sys/dev/ccd.c | |
| parent | 16510c2b023cc77a06b739e0808d3be74c428e29 (diff) | |
Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map). Try to deal with this:
* Group all information about the backend allocator for a pool in a
separate structure. The pool references this structure, rather than
the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
to become available, but will still fail if it cannot callocate KVA
space for the pages. If this happens, carefully drain all pools using
the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
some pages, and use that information to make draining easier and more
efficient.
* Get rid of PR_URGENT. There was only one use of it, and it could be
dealt with by the caller.
From art@openbsd.org.
Diffstat (limited to 'sys/dev/ccd.c')
| -rw-r--r-- | sys/dev/ccd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index d2952f3f432..f00a5e0d8de 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.75 2002/01/13 19:28:06 tsutsui Exp $ */ +/* $NetBSD: ccd.c,v 1.76 2002/03/08 20:48:37 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.75 2002/01/13 19:28:06 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.76 2002/03/08 20:48:37 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -201,7 +201,7 @@ ccdattach(num) /* Initialize the component buffer pool. */ pool_init(&ccd_cbufpool, sizeof(struct ccdbuf), 0, - 0, 0, "ccdpl", 0, NULL, NULL, M_DEVBUF); + 0, 0, "ccdpl", NULL); /* Initialize per-softc structures. */ for (i = 0; i < num; i++) { |
