Linux Kernel
3.7.1
|
#include <linux/mm.h>
#include <linux/gfp.h>
#include <linux/kernel_stat.h>
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/init.h>
#include <linux/pagemap.h>
#include <linux/backing-dev.h>
#include <linux/blkdev.h>
#include <linux/pagevec.h>
#include <linux/migrate.h>
#include <linux/page_cgroup.h>
#include <asm/pgtable.h>
Go to the source code of this file.
Macros | |
#define | INC_CACHE_INFO(x) do { swap_cache_info.x++; } while (0) |
Functions | |
void | show_swap_cache_info (void) |
int | add_to_swap_cache (struct page *page, swp_entry_t entry, gfp_t gfp_mask) |
void | __delete_from_swap_cache (struct page *page) |
int | add_to_swap (struct page *page) |
void | delete_from_swap_cache (struct page *page) |
void | free_page_and_swap_cache (struct page *page) |
void | free_pages_and_swap_cache (struct page **pages, int nr) |
struct page * | lookup_swap_cache (swp_entry_t entry) |
struct page * | read_swap_cache_async (swp_entry_t entry, gfp_t gfp_mask, struct vm_area_struct *vma, unsigned long addr) |
struct page * | swapin_readahead (swp_entry_t entry, gfp_t gfp_mask, struct vm_area_struct *vma, unsigned long addr) |
Variables | |
struct address_space | swapper_space |
#define INC_CACHE_INFO | ( | x | ) | do { swap_cache_info.x++; } while (0) |
Definition at line 47 of file swap_state.c.
Definition at line 123 of file swap_state.c.
Definition at line 144 of file swap_state.c.
int add_to_swap_cache | ( | struct page * | page, |
swp_entry_t | entry, | ||
gfp_t | gfp_mask | ||
) |
Definition at line 107 of file swap_state.c.
Definition at line 195 of file swap_state.c.
Definition at line 229 of file swap_state.c.
Definition at line 239 of file swap_state.c.
|
read |
Definition at line 262 of file swap_state.c.
|
read |
Definition at line 281 of file swap_state.c.
Definition at line 56 of file swap_state.c.
|
read |
swapin_readahead - swap in pages in hope we need them soon : swap entry of this memory : memory allocation flags : user vma this address belongs to : target address for mempolicy
Returns the struct page for entry and addr, after queueing swapin.
Primitive swap readahead code. We simply read an aligned block of (1 << page_cluster) entries in the swap area. This method is chosen because it doesn't cost us any seek time. We also make sure to queue the 'original' request together with the readahead ones...
This has been extended to use the NUMA policies from the mm triggering the readahead.
Caller must hold down_read on the vma->vm_mm if vma is not NULL.
Definition at line 373 of file swap_state.c.
unsigned long add_total |
Definition at line 50 of file swap_state.c.
unsigned long del_total |
Definition at line 51 of file swap_state.c.
unsigned long find_success |
Definition at line 52 of file swap_state.c.
unsigned long find_total |
Definition at line 53 of file swap_state.c.
struct address_space swapper_space |
Definition at line 39 of file swap_state.c.