version 1.182.4.1, 2010/05/30 05:17:58 |
version 1.182.4.2, 2010/07/03 01:19:54 |
Line 1745 pool_drain_start(struct pool **ppp, uint |
|
Line 1745 pool_drain_start(struct pool **ppp, uint |
|
} |
} |
} |
} |
|
|
void |
bool |
pool_drain_end(struct pool *pp, uint64_t where) |
pool_drain_end(struct pool *pp, uint64_t where) |
{ |
{ |
|
bool reclaimed; |
|
|
if (pp == NULL) |
if (pp == NULL) |
return; |
return false; |
|
|
KASSERT(pp->pr_refcnt > 0); |
KASSERT(pp->pr_refcnt > 0); |
|
|
Line 1759 pool_drain_end(struct pool *pp, uint64_t |
|
Line 1760 pool_drain_end(struct pool *pp, uint64_t |
|
xc_wait(where); |
xc_wait(where); |
|
|
/* Drain the cache (if any) and pool.. */ |
/* Drain the cache (if any) and pool.. */ |
pool_reclaim(pp); |
reclaimed = pool_reclaim(pp); |
|
|
/* Finally, unlock the pool. */ |
/* Finally, unlock the pool. */ |
mutex_enter(&pool_head_lock); |
mutex_enter(&pool_head_lock); |
pp->pr_refcnt--; |
pp->pr_refcnt--; |
cv_broadcast(&pool_busy); |
cv_broadcast(&pool_busy); |
mutex_exit(&pool_head_lock); |
mutex_exit(&pool_head_lock); |
|
|
|
return reclaimed; |
} |
} |
|
|
/* |
/* |