diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2007-12-09 00:24:05 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2007-12-09 00:24:05 +0000 |
commit | a97fecd5c075b793e76741901a7bb03dc771b15e (patch) | |
tree | 85d2756ce7c2e801807057de89fe2580195a4358 /sys/arch/alpha | |
parent | d780ea7b2cfdc9a094756f21b1e69fb0974bcf4a (diff) |
big patch to simplify pool code.
remove pool_cache code. it was barely used, and quite complex. it's
silly to have both a "fast" and "faster" allocation interface. provide
a ctor/dtor interface, and convert the few cache users to use it. no
caching at this time.
use mutexes to protect pools. they should be initialized with pool_setipl
if the pool may be used in an interrupt context, without existing spl
protection.
ok art deraadt thib
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r-- | sys/arch/alpha/alpha/pmap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index c7fdfe61943..61adcaae558 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.53 2007/09/03 17:29:58 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.54 2007/12/09 00:24:04 tedu Exp $ */ /* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */ /*- @@ -260,7 +260,6 @@ TAILQ_HEAD(, pmap) pmap_all_pmaps; */ struct pool pmap_pmap_pool; struct pool pmap_l1pt_pool; -struct pool_cache pmap_l1pt_cache; struct pool pmap_asn_pool; struct pool pmap_asngen_pool; struct pool pmap_pv_pool; @@ -903,8 +902,7 @@ pmap_bootstrap(paddr_t ptaddr, u_int maxasn, u_long ncpuids) &pool_allocator_nointr); pool_init(&pmap_l1pt_pool, PAGE_SIZE, 0, 0, 0, "l1ptpl", &pmap_l1pt_allocator); - pool_cache_init(&pmap_l1pt_cache, &pmap_l1pt_pool, pmap_l1pt_ctor, - NULL, NULL); + pool_set_ctordtor(&pmap_l1pt_pool, pmap_l1pt_ctor, NULL, NULL); pool_init(&pmap_asn_pool, pmap_ncpuids * sizeof(u_int), 0, 0, 0, "pmasnpl", &pool_allocator_nointr); pool_init(&pmap_asngen_pool, pmap_ncpuids * sizeof(u_long), 0, 0, 0, @@ -3418,8 +3416,10 @@ pmap_growkernel(vaddr_t maxkvaddr) va += ALPHA_L2SEG_SIZE; } +#if 0 /* Invalidate the L1 PT cache. */ pool_cache_invalidate(&pmap_l1pt_cache); +#endif virtual_end = va; @@ -3455,7 +3455,7 @@ pmap_lev1map_create(pmap_t pmap, cpuid_t cpu_id) simple_lock(&pmap_growkernel_slock); - l1pt = pool_cache_get(&pmap_l1pt_cache, PR_NOWAIT); + l1pt = pool_get(&pmap_l1pt_pool, PR_NOWAIT); if (l1pt == NULL) { simple_unlock(&pmap_growkernel_slock); return (ENOMEM); @@ -3523,7 +3523,7 @@ pmap_lev1map_destroy(pmap_t pmap, cpuid_t cpu_id) /* * Free the old level 1 page table page. */ - pool_cache_put(&pmap_l1pt_cache, l1pt); + pool_put(&pmap_l1pt_pool, l1pt); } /* |