diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-01-23 00:39:49 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-01-23 00:39:49 +0000 |
commit | 428a9d0c41ac6e6a1e3b34fe87ab6ef38f3764cb (patch) | |
tree | bca3c796baa50ba1a667d9fc1450766d842763b4 /sys/arch/m68k | |
parent | ad9498378fb50081ca58cbd745f9705b789f2da8 (diff) |
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/arch/m68k')
-rw-r--r-- | sys/arch/m68k/m68k/pmap_motorola.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c index aeff6d43056..02c67f39482 100644 --- a/sys/arch/m68k/m68k/pmap_motorola.c +++ b/sys/arch/m68k/m68k/pmap_motorola.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_motorola.c,v 1.15 2002/01/10 21:08:43 miod Exp $ */ +/* $OpenBSD: pmap_motorola.c,v 1.16 2002/01/23 00:39:47 art Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -574,7 +574,7 @@ pmap_init() * Initialize the pmap pools. */ pool_init(&pmap_pmap_pool, sizeof(struct pmap), 0, 0, 0, "pmappl", - 0, pool_page_alloc_nointr, pool_page_free_nointr, M_VMPMAP); + &pool_allocator_nointr); /* * Now it is safe to enable pv_table recording. |