| version 1.128.2.11, 2007/10/26 17:03:10 |
version 1.128.2.12, 2007/10/29 16:37:44 |
| Line 1640 pool_drain_start(struct pool **ppp, uint |
|
| Line 1640 pool_drain_start(struct pool **ppp, uint |
|
| { |
{ |
| struct pool *pp; |
struct pool *pp; |
| |
|
| |
KASSERT(!LIST_EMPTY(&pool_head)); |
| |
|
| pp = NULL; |
pp = NULL; |
| |
|
| /* Find next pool to drain, and add a reference. */ |
/* Find next pool to drain, and add a reference. */ |
| Line 1652 pool_drain_start(struct pool **ppp, uint |
|
| Line 1654 pool_drain_start(struct pool **ppp, uint |
|
| pp = drainpp; |
pp = drainpp; |
| drainpp = LIST_NEXT(pp, pr_poollist); |
drainpp = LIST_NEXT(pp, pr_poollist); |
| } |
} |
| /* Skip completely idle pools. */ |
/* |
| |
* Skip completely idle pools. We depend on at least |
| |
* one pool in the system being active. |
| |
*/ |
| } while (pp == NULL || pp->pr_npages == 0); |
} while (pp == NULL || pp->pr_npages == 0); |
| pp->pr_refcnt++; |
pp->pr_refcnt++; |
| mutex_exit(&pool_head_lock); |
mutex_exit(&pool_head_lock); |
| |
|
| /* If there is a pool_cache, drain CPU level caches. */ |
/* If there is a pool_cache, drain CPU level caches. */ |
| if (pp != NULL) { |
*ppp = pp; |
| *ppp = pp; |
if (pp->pr_cache != NULL) { |
| if (pp->pr_cache != NULL) { |
*wp = xc_broadcast(0, (xcfunc_t)pool_cache_xcall, |
| *wp = xc_broadcast(0, (xcfunc_t)pool_cache_xcall, |
pp->pr_cache, NULL); |
| pp->pr_cache, NULL); |
|
| } |
|
| } |
} |
| } |
} |
| |
|