Lines Matching refs:entry

70 void *get_shadow_from_swap_cache(swp_entry_t entry)
72 struct address_space *address_space = swap_address_space(entry);
73 pgoff_t idx = swp_offset(entry);
86 int add_to_swap_cache(struct folio *folio, swp_entry_t entry,
89 struct address_space *address_space = swap_address_space(entry);
90 pgoff_t idx = swp_offset(entry);
103 folio->swap = entry;
140 swp_entry_t entry, void *shadow)
142 struct address_space *address_space = swap_address_space(entry);
145 pgoff_t idx = swp_offset(entry);
155 void *entry = xas_store(&xas, shadow);
156 VM_BUG_ON_PAGE(entry != folio, entry);
178 swp_entry_t entry;
184 entry = folio_alloc_swap(folio);
185 if (!entry.val)
199 err = add_to_swap_cache(folio, entry,
223 put_swap_folio(folio, entry);
235 swp_entry_t entry = folio->swap;
236 struct address_space *address_space = swap_address_space(entry);
239 __delete_from_swap_cache(folio, entry, NULL);
242 put_swap_folio(folio, entry);
253 swp_entry_t entry = swp_entry(type, curr);
254 struct address_space *address_space = swap_address_space(entry);
324 * Lookup a swap entry in the swap cache. A found folio will be returned
331 struct folio *swap_cache_get_folio(swp_entry_t entry,
336 folio = filemap_get_folio(swap_address_space(entry), swp_offset(entry));
412 struct page *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
422 si = get_swap_device(entry);
433 folio = filemap_get_folio(swap_address_space(entry),
434 swp_offset(entry));
436 page = folio_file_page(folio, swp_offset(entry));
444 * swap entry in swap cache and marking swap slot
448 if (!swap_swapcount(si, entry) && swap_slot_cache_enabled)
461 * Swap entry may have been freed since our caller observed it.
463 err = swapcache_prepare(entry);
473 * stumble across a swap_map entry whose SWAP_HAS_CACHE
482 * The swap entry is ours to swap in. Prepare the new page.
488 if (mem_cgroup_swapin_charge_folio(folio, NULL, gfp_mask, entry))
492 if (add_to_swap_cache(folio, entry, gfp_mask & GFP_RECLAIM_MASK, &shadow))
495 mem_cgroup_swapin_uncharge_swap(entry);
509 put_swap_folio(folio, entry);
521 * the swap entry is no longer in use.
527 struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
532 struct page *retpage = __read_swap_cache_async(entry, gfp_mask,
604 * @entry: swap entry of this memory
608 * Returns the struct page for entry and addr, after queueing swapin.
620 struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask,
624 unsigned long entry_offset = swp_offset(entry);
628 struct swap_info_struct *si = swp_swap_info(entry);
651 swp_entry(swp_type(entry), offset),
670 return read_swap_cache_async(entry, gfp_mask, vma, addr, NULL);
768 * @fentry: swap entry of this memory
772 * Returns the struct page for entry and addr, after queueing swapin.
789 swp_entry_t entry;
812 entry = pte_to_swp_entry(pentry);
813 if (unlikely(non_swap_entry(entry)))
817 page = __read_swap_cache_async(entry, gfp_mask, vma,
843 * @entry: swap entry of this memory
847 * Returns the struct page for entry and addr, after queueing swapin.
849 * It's a main entry function for swap readahead. By the configuration,
853 struct page *swapin_readahead(swp_entry_t entry, gfp_t gfp_mask,
857 swap_vma_readahead(entry, gfp_mask, vmf) :
858 swap_cluster_readahead(entry, gfp_mask, vmf);