Lines Matching refs:cachind
122 int cachind; in ccw_alloc_request() local
148 for (cachind = 0; cachind < CCW_NUMBER_CACHES; cachind ++ ) in ccw_alloc_request()
149 if ( size_needed <= (SMALLEST_SLAB << cachind) ) in ccw_alloc_request()
153 if ( ccw_cache[cachind] == NULL ) in ccw_alloc_request()
155 request = kmem_cache_alloc ( ccw_cache[cachind], CCW_CACHE_TYPE ); in ccw_alloc_request()
158 memset ( request, 0, (SMALLEST_SLAB << cachind)); in ccw_alloc_request()
159 request->cache = ccw_cache[cachind]; in ccw_alloc_request()
248 int cachind; in ccwcache_init() local
263 for ( cachind = 0; cachind < CCW_NUMBER_CACHES; cachind ++ ) { in ccwcache_init()
264 int slabsize = SMALLEST_SLAB << cachind; in ccwcache_init()
267 sprintf ( ccw_cache_name[cachind], in ccwcache_init()
269 ccw_cache[cachind] = in ccwcache_init()
270 kmem_cache_create( ccw_cache_name[cachind], in ccwcache_init()
274 debug_int_event ( debug_area, 1, (long)ccw_cache[cachind]); in ccwcache_init()
275 if (ccw_cache[cachind] == NULL) in ccwcache_init()
289 int cachind; in ccwcache_cleanup() local
292 for ( cachind = 0; cachind < CCW_NUMBER_CACHES; cachind ++ ) { in ccwcache_cleanup()
293 if ( ccw_cache[cachind] ) { in ccwcache_cleanup()
295 if ( kmem_cache_shrink(ccw_cache[cachind]) == 0 ) { in ccwcache_cleanup()
296 ccw_cache[cachind] = NULL; in ccwcache_cleanup()
299 kmem_cache_destroy(ccw_cache[cachind]); in ccwcache_cleanup()