Lines Matching refs:slots
127 swp_entry_t *slots, *slots_ret; in alloc_swap_slot_cache() local
142 slots = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t), in alloc_swap_slot_cache()
144 if (!slots) in alloc_swap_slot_cache()
150 kvfree(slots); in alloc_swap_slot_cache()
156 if (cache->slots || cache->slots_ret) { in alloc_swap_slot_cache()
160 kvfree(slots); in alloc_swap_slot_cache()
181 cache->slots = slots; in alloc_swap_slot_cache()
191 swp_entry_t *slots = NULL; in drain_slots_cache_cpu() local
201 if ((type & SLOTS_CACHE) && cache->slots) { in drain_slots_cache_cpu()
203 swapcache_free_entries(cache->slots + cache->cur, cache->nr); in drain_slots_cache_cpu()
206 if (free_slots && cache->slots) { in drain_slots_cache_cpu()
207 kvfree(cache->slots); in drain_slots_cache_cpu()
208 cache->slots = NULL; in drain_slots_cache_cpu()
217 slots = cache->slots_ret; in drain_slots_cache_cpu()
221 if (slots) in drain_slots_cache_cpu()
222 kvfree(slots); in drain_slots_cache_cpu()
294 cache->slots, 1); in refill_swap_slots_cache()
365 if (likely(check_cache_active() && cache->slots)) { in get_swap_page()
367 if (cache->slots) { in get_swap_page()
370 entry = cache->slots[cache->cur]; in get_swap_page()
371 cache->slots[cache->cur++].val = 0; in get_swap_page()