Lines Matching refs:cache
560 * We keep a per-processor cache of kernel message buffers.
561 * The cache saves the overhead/locking of using kalloc/kfree.
562 * The per-processor cache seems to miss less than a per-thread cache,
563 * and it also uses less memory. Access to the cache doesn't
571 * the cache, that is best. Otherwise, allocate a new one.
618 struct ikm_cache *cache;
622 cache = &PROCESSOR_DATA(current_processor(), ikm_cache);
623 if ((i = cache->avail) > 0) {
625 kmsg = cache->entries[--i];
626 cache->avail = i;
692 * Peek and see if it has to go back in the cache.
695 struct ikm_cache *cache;
699 cache = &PROCESSOR_DATA(current_processor(), ikm_cache);
700 if ((i = cache->avail) < IKM_STASH) {
701 cache->entries[i] = kmsg;
702 cache->avail = i + 1;