Lines Matching defs:cache
195 * We keep a per-processor cache of kernel message buffers.
196 * The cache saves the overhead/locking of using kalloc/kfree.
197 * The per-processor cache seems to miss less than a per-thread cache,
198 * and it also uses less memory. Access to the cache doesn't
206 * the cache, that is best. Otherwise, allocate a new one.
250 struct ikm_cache *cache;
254 cache = &PROCESSOR_DATA(current_processor(), ikm_cache);
255 if ((i = cache->avail) > 0) {
257 kmsg = cache->entries[--i];
258 cache->avail = i;
328 * Peek and see if it has to go back in the cache.
331 struct ikm_cache *cache;
335 cache = &PROCESSOR_DATA(current_processor(), ikm_cache);
336 if ((i = cache->avail) < IKM_STASH) {
337 cache->entries[i] = kmsg;
338 cache->avail = i + 1;