Lines Matching full:swap
6 * Swap reorganised 29.12.95, Stephen Tweedie
14 #include <linux/swap.h>
27 #include "swap.h"
69 printk("%lu pages in swap cache\n", total_swapcache_pages()); in show_swap_cache_info()
70 printk("Free swap = %ldkB\n", K(get_nr_swap_pages())); in show_swap_cache_info()
71 printk("Total swap = %lukB\n", K(total_swap_pages)); in show_swap_cache_info()
107 folio->swap = entry; in add_to_swap_cache()
141 * been verified to be in the swap cache.
163 folio->swap.val = 0; in __delete_from_swap_cache()
171 * add_to_swap - allocate swap space for a folio
172 * @folio: folio we want to move to swap
174 * Allocate swap space for the folio and add the folio to the
175 * swap cache.
178 * Return: Whether the folio was added to the swap cache.
198 * deadlock in the swap out path. in add_to_swap()
201 * Add it to the swap cache. in add_to_swap()
233 * been verified to be in the swap cache and locked.
239 swp_entry_t entry = folio->swap; in delete_from_swap_cache()
282 * If we are the only user, then try to free up the swap cache.
299 * Perform a free_page(), also freeing any swap cache associated with
344 * Lookup a swap entry in the swap cache. A found folio will be returned
349 * Caller must lock the swap device or hold a reference to keep it valid.
395 * filemap_get_incore_folio - Find and get a folio from the page or swap caches.
400 * folio in the swap cache.
450 * First check the swap cache. Since this is normally in __read_swap_cache_async()
460 * Just skip read ahead for unused swap slot. in __read_swap_cache_async()
463 * swap entry in swap cache and marking swap slot in __read_swap_cache_async()
471 * Get a new folio to read into from swap. Allocate it now if in __read_swap_cache_async()
483 * Swap entry may have been freed since our caller observed it. in __read_swap_cache_async()
494 * is set but the folio is not the swap cache yet. This can in __read_swap_cache_async()
507 * in swap_map, but not yet added its folio to swap cache. in __read_swap_cache_async()
513 * The swap entry is ours to swap in. Prepare the new folio. in __read_swap_cache_async()
549 * Locate a page of swap in physical memory, reserving swap cache space
552 * the swap entry is no longer in use.
556 * swap cache folio lock.
595 * (and don't even bother to check whether swap type is same). in __swapin_nr_pages()
639 * swap_cluster_readahead - swap in pages in hope we need them soon
640 * @entry: swap entry of this memory
647 * Primitive swap readahead code. We simply read an aligned block of
648 * (1 << page_cluster) entries in the swap area. This method is chosen
653 * are used for every page of the readahead: neighbouring pages on swap
676 if (!start_offset) /* First page is swap header. */ in swap_cluster_readahead()
724 /* swap cache doesn't use writeback related tags */ in init_swap_address_space()
784 * swap_vma_readahead - swap in pages in hope we need them soon
785 * @targ_entry: swap entry of the targeted memory
793 * Primitive swap readahead code. We simply read in a few pages whose
861 * swapin_readahead - swap in pages in hope we need them soon
862 * @entry: swap entry of this memory
868 * It's a main entry function for swap readahead. By the configuration,
923 swap_kobj = kobject_create_and_add("swap", mm_kobj); in swap_init_sysfs()
925 pr_err("failed to create swap kobject\n"); in swap_init_sysfs()
930 pr_err("failed to register swap group\n"); in swap_init_sysfs()