| version 1.69, 2002/03/08 21:43:54 |
version 1.70, 2002/03/09 01:33:34 |
| Line 580 pool_destroy(struct pool *pp) |
|
| Line 580 pool_destroy(struct pool *pp) |
|
| #endif |
#endif |
| |
|
| /* Remove all pages */ |
/* Remove all pages */ |
| if ((pp->pr_roflags & PR_STATIC) == 0) |
while ((ph = TAILQ_FIRST(&pp->pr_pagelist)) != NULL) |
| while ((ph = TAILQ_FIRST(&pp->pr_pagelist)) != NULL) |
pr_rmpage(pp, ph, NULL); |
| pr_rmpage(pp, ph, NULL); |
|
| |
|
| /* Remove from global pool list */ |
/* Remove from global pool list */ |
| simple_lock(&pool_head_slock); |
simple_lock(&pool_head_slock); |
| Line 645 pool_get(struct pool *pp, int flags) |
|
| Line 644 pool_get(struct pool *pp, int flags) |
|
| void *v; |
void *v; |
| |
|
| #ifdef DIAGNOSTIC |
#ifdef DIAGNOSTIC |
| if (__predict_false((pp->pr_roflags & PR_STATIC) && |
|
| (flags & PR_MALLOCOK))) { |
|
| pr_printlog(pp, NULL, printf); |
|
| panic("pool_get: static"); |
|
| } |
|
| |
|
| if (__predict_false(curproc == NULL && doing_shutdown == 0 && |
if (__predict_false(curproc == NULL && doing_shutdown == 0 && |
| (flags & PR_WAITOK) != 0)) |
(flags & PR_WAITOK) != 0)) |
| panic("pool_get: must have NOWAIT"); |
panic("pool_get: must have NOWAIT"); |
| Line 1178 pool_catchup(struct pool *pp) |
|
| Line 1171 pool_catchup(struct pool *pp) |
|
| caddr_t cp; |
caddr_t cp; |
| int error = 0; |
int error = 0; |
| |
|
| if (pp->pr_roflags & PR_STATIC) { |
|
| /* |
|
| * We dropped below the low water mark, and this is not a |
|
| * good thing. Log a warning. |
|
| * |
|
| * XXX: rate-limit this? |
|
| */ |
|
| printf("WARNING: static pool `%s' dropped below low water " |
|
| "mark\n", pp->pr_wchan); |
|
| return (0); |
|
| } |
|
| |
|
| while (POOL_NEEDS_CATCHUP(pp)) { |
while (POOL_NEEDS_CATCHUP(pp)) { |
| /* |
/* |
| * Call the page back-end allocator for more memory. |
* Call the page back-end allocator for more memory. |
| Line 1291 pool_reclaim(struct pool *pp) |
|
| Line 1272 pool_reclaim(struct pool *pp) |
|
| struct pool_pagelist pq; |
struct pool_pagelist pq; |
| int s; |
int s; |
| |
|
| if (pp->pr_roflags & PR_STATIC) |
|
| return (0); |
|
| |
|
| if (pp->pr_drain_hook != NULL) { |
if (pp->pr_drain_hook != NULL) { |
| /* |
/* |
| * The drain hook must be called with the pool unlocked. |
* The drain hook must be called with the pool unlocked. |