Lines Matching refs:slots
118 swp_entry_t *slots, *slots_ret; in alloc_swap_slot_cache() local
125 slots = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t), in alloc_swap_slot_cache()
127 if (!slots) in alloc_swap_slot_cache()
133 kvfree(slots); in alloc_swap_slot_cache()
139 if (cache->slots || cache->slots_ret) in alloc_swap_slot_cache()
157 cache->slots = slots; in alloc_swap_slot_cache()
158 slots = NULL; in alloc_swap_slot_cache()
163 if (slots) in alloc_swap_slot_cache()
164 kvfree(slots); in alloc_swap_slot_cache()
174 swp_entry_t *slots = NULL; in drain_slots_cache_cpu() local
177 if ((type & SLOTS_CACHE) && cache->slots) { in drain_slots_cache_cpu()
179 swapcache_free_entries(cache->slots + cache->cur, cache->nr); in drain_slots_cache_cpu()
182 if (free_slots && cache->slots) { in drain_slots_cache_cpu()
183 kvfree(cache->slots); in drain_slots_cache_cpu()
184 cache->slots = NULL; in drain_slots_cache_cpu()
193 slots = cache->slots_ret; in drain_slots_cache_cpu()
197 if (slots) in drain_slots_cache_cpu()
198 kvfree(slots); in drain_slots_cache_cpu()
273 cache->slots, 1); in refill_swap_slots_cache()
334 if (likely(check_cache_active() && cache->slots)) { in get_swap_page()
336 if (cache->slots) { in get_swap_page()
339 pentry = &cache->slots[cache->cur++]; in get_swap_page()