| version 1.145, 2007/12/26 16:01:36 |
version 1.146, 2008/01/02 11:48:53 |
| Line 2606 pool_cache_put_slow(pool_cache_cpu_t *cc |
|
| Line 2606 pool_cache_put_slow(pool_cache_cpu_t *cc |
|
| /* |
/* |
| * If there's a empty group, release our full |
* If there's a empty group, release our full |
| * group back to the cache. Install the empty |
* group back to the cache. Install the empty |
| * group as cc_current and return. |
* group and return. |
| */ |
*/ |
| if ((cur = cc->cc_current) != NULL) { |
|
| KASSERT(cur->pcg_avail == pcg->pcg_size); |
|
| cur->pcg_next = pc->pc_fullgroups; |
|
| pc->pc_fullgroups = cur; |
|
| pc->pc_nfull++; |
|
| } |
|
| KASSERT(pcg->pcg_avail == 0); |
KASSERT(pcg->pcg_avail == 0); |
| cc->cc_current = pcg; |
|
| pc->pc_emptygroups = pcg->pcg_next; |
pc->pc_emptygroups = pcg->pcg_next; |
| |
if (cc->cc_previous == NULL) { |
| |
cc->cc_previous = pcg; |
| |
} else { |
| |
if ((cur = cc->cc_current) != NULL) { |
| |
KASSERT(cur->pcg_avail == pcg->pcg_size); |
| |
cur->pcg_next = pc->pc_fullgroups; |
| |
pc->pc_fullgroups = cur; |
| |
pc->pc_nfull++; |
| |
} |
| |
cc->cc_current = pcg; |
| |
} |
| pc->pc_hits++; |
pc->pc_hits++; |
| pc->pc_nempty--; |
pc->pc_nempty--; |
| mutex_exit(&pc->pc_lock); |
mutex_exit(&pc->pc_lock); |
| Line 2637 pool_cache_put_slow(pool_cache_cpu_t *cc |
|
| Line 2641 pool_cache_put_slow(pool_cache_cpu_t *cc |
|
| * object away. |
* object away. |
| */ |
*/ |
| nobj = pc->pc_pcgsize; |
nobj = pc->pc_pcgsize; |
| if (nobj == PCG_NOBJECTS_LARGE) { |
if (pool_cache_disable) { |
| |
pcg = NULL; |
| |
} else if (nobj == PCG_NOBJECTS_LARGE) { |
| pcg = pool_get(&pcg_large_pool, PR_NOWAIT); |
pcg = pool_get(&pcg_large_pool, PR_NOWAIT); |
| } else { |
} else { |
| pcg = pool_get(&pcg_normal_pool, PR_NOWAIT); |
pcg = pool_get(&pcg_normal_pool, PR_NOWAIT); |