Lines Matching refs:entry
79 swp_entry_t entry = swp_entry(i, 1); in total_swapcache_pages() local
82 if (!swp_swap_info(entry)) in total_swapcache_pages()
85 si = get_swap_device(entry); in total_swapcache_pages()
111 void *get_shadow_from_swap_cache(swp_entry_t entry) in get_shadow_from_swap_cache() argument
113 struct address_space *address_space = swap_address_space(entry); in get_shadow_from_swap_cache()
114 pgoff_t idx = swp_offset(entry); in get_shadow_from_swap_cache()
129 int add_to_swap_cache(struct page *page, swp_entry_t entry, in add_to_swap_cache() argument
132 struct address_space *address_space = swap_address_space(entry); in add_to_swap_cache()
133 pgoff_t idx = swp_offset(entry); in add_to_swap_cache()
160 set_page_private(page + i, entry.val + i); in add_to_swap_cache()
185 swp_entry_t entry, void *shadow) in __delete_from_swap_cache() argument
187 struct address_space *address_space = swap_address_space(entry); in __delete_from_swap_cache()
189 pgoff_t idx = swp_offset(entry); in __delete_from_swap_cache()
197 void *entry = xas_store(&xas, shadow); in __delete_from_swap_cache() local
198 VM_BUG_ON_PAGE(entry != page, entry); in __delete_from_swap_cache()
219 swp_entry_t entry; in add_to_swap() local
225 entry = get_swap_page(page); in add_to_swap()
226 if (!entry.val) in add_to_swap()
240 err = add_to_swap_cache(page, entry, in add_to_swap()
263 put_swap_page(page, entry); in add_to_swap()
275 swp_entry_t entry = { .val = page_private(page) }; in delete_from_swap_cache() local
276 struct address_space *address_space = swap_address_space(entry); in delete_from_swap_cache()
279 __delete_from_swap_cache(page, entry, NULL); in delete_from_swap_cache()
282 put_swap_page(page, entry); in delete_from_swap_cache()
294 swp_entry_t entry = swp_entry(type, curr); in clear_shadow_from_swap_cache() local
295 struct address_space *address_space = swap_address_space(entry); in clear_shadow_from_swap_cache()
370 struct page *lookup_swap_cache(swp_entry_t entry, struct vm_area_struct *vma, in lookup_swap_cache() argument
376 si = get_swap_device(entry); in lookup_swap_cache()
379 page = find_get_page(swap_address_space(entry), swp_offset(entry)); in lookup_swap_cache()
452 struct page *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, in __read_swap_cache_async() argument
469 si = get_swap_device(entry); in __read_swap_cache_async()
472 page = find_get_page(swap_address_space(entry), in __read_swap_cache_async()
473 swp_offset(entry)); in __read_swap_cache_async()
486 if (!__swp_swapcount(entry) && swap_slot_cache_enabled) in __read_swap_cache_async()
501 err = swapcache_prepare(entry); in __read_swap_cache_async()
527 if (add_to_swap_cache(page, entry, gfp_mask & GFP_RECLAIM_MASK, &shadow)) { in __read_swap_cache_async()
528 put_swap_page(page, entry); in __read_swap_cache_async()
558 struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, in read_swap_cache_async() argument
562 struct page *retpage = __read_swap_cache_async(entry, gfp_mask, in read_swap_cache_async()
654 struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask, in swap_cluster_readahead() argument
658 unsigned long entry_offset = swp_offset(entry); in swap_cluster_readahead()
662 struct swap_info_struct *si = swp_swap_info(entry); in swap_cluster_readahead()
692 swp_entry(swp_type(entry), offset), in swap_cluster_readahead()
709 return read_swap_cache_async(entry, gfp_mask, vma, addr, do_poll); in swap_cluster_readahead()
760 swp_entry_t entry; in swap_ra_info() local
778 entry = pte_to_swp_entry(*pte); in swap_ra_info()
779 if ((unlikely(non_swap_entry(entry)))) { in swap_ra_info()
844 swp_entry_t entry; in swap_vma_readahead() local
861 entry = pte_to_swp_entry(pentry); in swap_vma_readahead()
862 if (unlikely(non_swap_entry(entry))) in swap_vma_readahead()
864 page = __read_swap_cache_async(entry, gfp_mask, vma, in swap_vma_readahead()
896 struct page *swapin_readahead(swp_entry_t entry, gfp_t gfp_mask, in swapin_readahead() argument
900 swap_vma_readahead(entry, gfp_mask, vmf) : in swapin_readahead()
901 swap_cluster_readahead(entry, gfp_mask, vmf); in swapin_readahead()