[BACK]Return to subr_pool.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/subr_pool.c between version 1.145 and 1.146

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);

Legend:
Removed from v.1.145  
changed lines
  Added in v.1.146

CVSweb <webmaster@jp.NetBSD.org>