Lines Matching refs:slots
117 swp_entry_t *slots, *slots_ret; in alloc_swap_slot_cache() local
124 slots = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t), in alloc_swap_slot_cache()
126 if (!slots) in alloc_swap_slot_cache()
132 kvfree(slots); in alloc_swap_slot_cache()
138 if (cache->slots || cache->slots_ret) { in alloc_swap_slot_cache()
142 kvfree(slots); in alloc_swap_slot_cache()
163 cache->slots = slots; in alloc_swap_slot_cache()
173 swp_entry_t *slots = NULL; in drain_slots_cache_cpu() local
176 if ((type & SLOTS_CACHE) && cache->slots) { in drain_slots_cache_cpu()
178 swapcache_free_entries(cache->slots + cache->cur, cache->nr); in drain_slots_cache_cpu()
181 if (free_slots && cache->slots) { in drain_slots_cache_cpu()
182 kvfree(cache->slots); in drain_slots_cache_cpu()
183 cache->slots = NULL; in drain_slots_cache_cpu()
192 slots = cache->slots_ret; in drain_slots_cache_cpu()
196 if (slots) in drain_slots_cache_cpu()
197 kvfree(slots); in drain_slots_cache_cpu()
269 cache->slots, 1); in refill_swap_slots_cache()
330 if (likely(check_cache_active() && cache->slots)) { in get_swap_page()
332 if (cache->slots) { in get_swap_page()
335 entry = cache->slots[cache->cur]; in get_swap_page()
336 cache->slots[cache->cur++].val = 0; in get_swap_page()