| version 1.175, 2009/10/08 21:54:45 |
version 1.176, 2009/10/15 20:50:12 |
| Line 2289 pool_cache_invalidate_groups(pool_cache_ |
|
| Line 2289 pool_cache_invalidate_groups(pool_cache_ |
|
| * |
* |
| * Invalidate a pool cache (destruct and release all of the |
* Invalidate a pool cache (destruct and release all of the |
| * cached objects). Does not reclaim objects from the pool. |
* cached objects). Does not reclaim objects from the pool. |
| |
* |
| |
* Note: For pool caches that provide constructed objects, there |
| |
* is an assumption that another level of synchronization is occurring |
| |
* between the input to the constructor and the cache invalidation. |
| */ |
*/ |
| void |
void |
| pool_cache_invalidate(pool_cache_t pc) |
pool_cache_invalidate(pool_cache_t pc) |
| { |
{ |
| pcg_t *full, *empty, *part; |
pcg_t *full, *empty, *part; |
| |
uint64_t where; |
| |
|
| |
if (ncpu < 2) { |
| |
/* |
| |
* We might be called early enough in the boot process |
| |
* for the CPU data structures to not be fully initialized. |
| |
* In this case, simply gather the local CPU's cache now |
| |
* since it will be the only one running. |
| |
*/ |
| |
pool_cache_xcall(pc); |
| |
} else { |
| |
/* |
| |
* Gather all of the CPU-specific caches into the |
| |
* global cache. |
| |
*/ |
| |
where = xc_broadcast(0, (xcfunc_t)pool_cache_xcall, pc, NULL); |
| |
xc_wait(where); |
| |
} |
| |
|
| mutex_enter(&pc->pc_lock); |
mutex_enter(&pc->pc_lock); |
| full = pc->pc_fullgroups; |
full = pc->pc_fullgroups; |
| Line 2313 pool_cache_invalidate(pool_cache_t pc) |
|
| Line 2335 pool_cache_invalidate(pool_cache_t pc) |
|
| } |
} |
| |
|
| /* |
/* |
| * pool_cache_invalidate_local: |
|
| * |
|
| * Invalidate all local ('current CPU') cached objects in |
|
| * pool cache. |
|
| * It is caller's responsibility to ensure that no operation is |
|
| * taking place on this pool cache while doing the local invalidation. |
|
| */ |
|
| void |
|
| pool_cache_invalidate_local(pool_cache_t pc) |
|
| { |
|
| pool_cache_invalidate_cpu(pc, curcpu()->ci_index); |
|
| } |
|
| |
|
| /* |
|
| * pool_cache_invalidate_cpu: |
* pool_cache_invalidate_cpu: |
| * |
* |
| * Invalidate all CPU-bound cached objects in pool cache, the CPU being |
* Invalidate all CPU-bound cached objects in pool cache, the CPU being |