Lines Matching full:swap
6 * Swap reorganised 29.12.95, Stephen Tweedie
13 #include <linux/swap.h>
25 #include "swap.h"
65 printk("%lu pages in swap cache\n", total_swapcache_pages()); in show_swap_cache_info()
66 printk("Free swap = %ldkB\n", K(get_nr_swap_pages())); in show_swap_cache_info()
67 printk("Total swap = %lukB\n", K(total_swap_pages)); in show_swap_cache_info()
103 folio->swap = entry; in add_to_swap_cache()
137 * been verified to be in the swap cache.
159 folio->swap.val = 0; in __delete_from_swap_cache()
167 * add_to_swap - allocate swap space for a folio
168 * @folio: folio we want to move to swap
170 * Allocate swap space for the folio and add the folio to the
171 * swap cache.
174 * Return: Whether the folio was added to the swap cache.
194 * deadlock in the swap out path. in add_to_swap()
197 * Add it to the swap cache. in add_to_swap()
229 * been verified to be in the swap cache and locked.
235 swp_entry_t entry = folio->swap; in delete_from_swap_cache()
277 * If we are the only user, then try to free up the swap cache.
296 * Perform a free_page(), also freeing any swap cache associated with
324 * Lookup a swap entry in the swap cache. A found folio will be returned
329 * Caller must lock the swap device or hold a reference to keep it valid.
375 * filemap_get_incore_folio - Find and get a folio from the page or swap caches.
380 * folio in the swap cache.
429 * First check the swap cache. Since this is normally in __read_swap_cache_async()
441 * Just skip read ahead for unused swap slot. in __read_swap_cache_async()
444 * swap entry in swap cache and marking swap slot in __read_swap_cache_async()
452 * Get a new page to read into from swap. Allocate it now, in __read_swap_cache_async()
461 * Swap entry may have been freed since our caller observed it. in __read_swap_cache_async()
476 * in swap_map, but not yet added its page to swap cache. in __read_swap_cache_async()
482 * The swap entry is ours to swap in. Prepare the new page. in __read_swap_cache_async()
518 * Locate a page of swap in physical memory, reserving swap cache space
521 * the swap entry is no longer in use.
525 * swap cache folio lock.
559 * (and don't even bother to check whether swap type is same). in __swapin_nr_pages()
603 * swap_cluster_readahead - swap in pages in hope we need them soon
604 * @entry: swap entry of this memory
610 * Primitive swap readahead code. We simply read an aligned block of
611 * (1 << page_cluster) entries in the swap area. This method is chosen
642 if (!start_offset) /* First page is swap header. */ in swap_cluster_readahead()
687 /* swap cache doesn't use writeback related tags */ in init_swap_address_space()
767 * swap_vma_readahead - swap in pages in hope we need them soon
768 * @fentry: swap entry of this memory
774 * Primitive swap readahead code. We simply read in a few pages whose
842 * swapin_readahead - swap in pages in hope we need them soon
843 * @entry: swap entry of this memory
849 * It's a main entry function for swap readahead. By the configuration,
896 swap_kobj = kobject_create_and_add("swap", mm_kobj); in swap_init_sysfs()
898 pr_err("failed to create swap kobject\n"); in swap_init_sysfs()
903 pr_err("failed to register swap group\n"); in swap_init_sysfs()