Lines Matching refs:entry
72 void *get_shadow_from_swap_cache(swp_entry_t entry) in get_shadow_from_swap_cache() argument
74 struct address_space *address_space = swap_address_space(entry); in get_shadow_from_swap_cache()
75 pgoff_t idx = swap_cache_index(entry); in get_shadow_from_swap_cache()
88 int add_to_swap_cache(struct folio *folio, swp_entry_t entry, in add_to_swap_cache() argument
91 struct address_space *address_space = swap_address_space(entry); in add_to_swap_cache()
92 pgoff_t idx = swap_cache_index(entry); in add_to_swap_cache()
105 folio->swap = entry; in add_to_swap_cache()
142 swp_entry_t entry, void *shadow) in __delete_from_swap_cache() argument
144 struct address_space *address_space = swap_address_space(entry); in __delete_from_swap_cache()
147 pgoff_t idx = swap_cache_index(entry); in __delete_from_swap_cache()
157 void *entry = xas_store(&xas, shadow); in __delete_from_swap_cache() local
158 VM_BUG_ON_PAGE(entry != folio, entry); in __delete_from_swap_cache()
176 swp_entry_t entry = folio->swap; in delete_from_swap_cache() local
177 struct address_space *address_space = swap_address_space(entry); in delete_from_swap_cache()
180 __delete_from_swap_cache(folio, entry, NULL); in delete_from_swap_cache()
183 put_swap_folio(folio, entry); in delete_from_swap_cache()
194 swp_entry_t entry = swp_entry(type, curr); in clear_shadow_from_swap_cache() local
196 struct address_space *address_space = swap_address_space(entry); in clear_shadow_from_swap_cache()
283 struct folio *swap_cache_get_folio(swp_entry_t entry, in swap_cache_get_folio() argument
288 folio = filemap_get_folio(swap_address_space(entry), swap_cache_index(entry)); in swap_cache_get_folio()
364 struct folio *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, in __read_swap_cache_async() argument
368 struct swap_info_struct *si = swp_swap_info(entry); in __read_swap_cache_async()
382 folio = filemap_get_folio(swap_address_space(entry), in __read_swap_cache_async()
383 swap_cache_index(entry)); in __read_swap_cache_async()
390 if (!swap_entry_swapped(si, entry)) in __read_swap_cache_async()
408 err = swapcache_prepare(entry, 1); in __read_swap_cache_async()
441 if (mem_cgroup_swapin_charge_folio(new_folio, NULL, gfp_mask, entry)) in __read_swap_cache_async()
445 if (add_to_swap_cache(new_folio, entry, gfp_mask & GFP_RECLAIM_MASK, &shadow)) in __read_swap_cache_async()
448 memcg1_swapin(entry, 1); in __read_swap_cache_async()
462 put_swap_folio(new_folio, entry); in __read_swap_cache_async()
480 struct folio *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, in read_swap_cache_async() argument
490 si = get_swap_device(entry); in read_swap_cache_async()
495 folio = __read_swap_cache_async(entry, gfp_mask, mpol, ilx, in read_swap_cache_async()
585 struct folio *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask, in swap_cluster_readahead() argument
589 unsigned long entry_offset = swp_offset(entry); in swap_cluster_readahead()
593 struct swap_info_struct *si = swp_swap_info(entry); in swap_cluster_readahead()
614 swp_entry(swp_type(entry), offset), in swap_cluster_readahead()
632 folio = __read_swap_cache_async(entry, gfp_mask, mpol, ilx, in swap_cluster_readahead()
737 swp_entry_t entry; in swap_vma_readahead() local
757 entry = pte_to_swp_entry(pentry); in swap_vma_readahead()
758 if (unlikely(non_swap_entry(entry))) in swap_vma_readahead()
762 folio = __read_swap_cache_async(entry, gfp_mask, mpol, ilx, in swap_vma_readahead()
801 struct folio *swapin_readahead(swp_entry_t entry, gfp_t gfp_mask, in swapin_readahead() argument
810 swap_vma_readahead(entry, gfp_mask, mpol, ilx, vmf) : in swapin_readahead()
811 swap_cluster_readahead(entry, gfp_mask, mpol, ilx); in swapin_readahead()