Lines Matching defs:ccp
378 mcache_cpu_t *ccp = &cp->mc_cpu[c];
380 VERIFY(IS_P2ALIGNED(ccp, CPU_CACHE_SIZE));
381 lck_mtx_init(&ccp->cc_lock, cp->mc_cpu_lock_grp,
383 ccp->cc_objs = -1;
384 ccp->cc_pobjs = -1;
423 mcache_cpu_t *ccp;
440 ccp = MCACHE_CPU(cp);
442 MCACHE_LOCK(&ccp->cc_lock);
449 if (ccp->cc_objs > 0) {
458 objs = MIN((unsigned int)ccp->cc_objs, need);
459 *list = ccp->cc_filled->bkt_obj[ccp->cc_objs - 1];
460 ccp->cc_objs -= objs;
461 ccp->cc_alloc += objs;
463 tail = ccp->cc_filled->bkt_obj[ccp->cc_objs];
469 MCACHE_UNLOCK(&ccp->cc_lock);
481 if (ccp->cc_pobjs > 0) {
482 mcache_cpu_refill(ccp, ccp->cc_pfilled, ccp->cc_pobjs);
491 if (ccp->cc_bktsize == 0)
501 if (ccp->cc_pfilled != NULL)
503 ccp->cc_pfilled);
504 mcache_cpu_refill(ccp, bkt, ccp->cc_bktsize);
514 MCACHE_UNLOCK(&ccp->cc_lock);
676 mcache_cpu_t *ccp = MCACHE_CPU(cp);
685 MCACHE_LOCK(&ccp->cc_lock);
693 if ((unsigned int)ccp->cc_objs <
694 (unsigned int)ccp->cc_bktsize) {
701 list->obj_next = (ccp->cc_objs == 0) ? NULL :
702 ccp->cc_filled->bkt_obj[ccp->cc_objs - 1];
703 ccp->cc_filled->bkt_obj[ccp->cc_objs++] = list;
704 ccp->cc_free++;
710 MCACHE_UNLOCK(&ccp->cc_lock);
722 if (ccp->cc_pobjs == 0) {
723 mcache_cpu_refill(ccp, ccp->cc_pfilled, ccp->cc_pobjs);
732 if (ccp->cc_bktsize == 0)
742 if (ccp->cc_pfilled != NULL)
744 ccp->cc_pfilled);
745 mcache_cpu_refill(ccp, bkt, 0);
756 MCACHE_UNLOCK(&ccp->cc_lock);
758 MCACHE_LOCK(&ccp->cc_lock);
766 if (ccp->cc_bktsize != btp->bt_bktsize) {
767 MCACHE_UNLOCK(&ccp->cc_lock);
769 MCACHE_LOCK(&ccp->cc_lock);
787 MCACHE_UNLOCK(&ccp->cc_lock);
1023 mcache_cpu_refill(mcache_cpu_t *ccp, mcache_bkt_t *bkt, int objs)
1025 ASSERT((ccp->cc_filled == NULL && ccp->cc_objs == -1) ||
1026 (ccp->cc_filled && ccp->cc_objs + objs == ccp->cc_bktsize));
1027 ASSERT(ccp->cc_bktsize > 0);
1029 ccp->cc_pfilled = ccp->cc_filled;
1030 ccp->cc_pobjs = ccp->cc_objs;
1031 ccp->cc_filled = bkt;
1032 ccp->cc_objs = objs;
1089 mcache_cpu_t *ccp;
1096 ccp = &cp->mc_cpu[cpu];
1097 MCACHE_LOCK(&ccp->cc_lock);
1098 ccp->cc_bktsize = cp->cache_bkttype->bt_bktsize;
1099 MCACHE_UNLOCK(&ccp->cc_lock);
1109 mcache_cpu_t *ccp;
1115 ccp = &cp->mc_cpu[cpu];
1117 MCACHE_LOCK(&ccp->cc_lock);
1120 bp = ccp->cc_filled;
1121 pbp = ccp->cc_pfilled;
1122 objs = ccp->cc_objs;
1123 pobjs = ccp->cc_pobjs;
1124 ccp->cc_filled = NULL;
1125 ccp->cc_pfilled = NULL;
1126 ccp->cc_objs = -1;
1127 ccp->cc_pobjs = -1;
1128 ccp->cc_bktsize = 0;
1130 MCACHE_UNLOCK(&ccp->cc_lock);