Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
swap.c File Reference
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/kernel_stat.h>
#include <linux/swap.h>
#include <linux/mman.h>
#include <linux/pagemap.h>
#include <linux/pagevec.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/mm_inline.h>
#include <linux/percpu_counter.h>
#include <linux/percpu.h>
#include <linux/cpu.h>
#include <linux/notifier.h>
#include <linux/backing-dev.h>
#include <linux/memcontrol.h>
#include <linux/gfp.h>
#include "internal.h"

Go to the source code of this file.

Functions

void put_page (struct page *page)
 
 EXPORT_SYMBOL (put_page)
 
bool __get_page_tail (struct page *page)
 
 EXPORT_SYMBOL (__get_page_tail)
 
void put_pages_list (struct list_head *pages)
 
 EXPORT_SYMBOL (put_pages_list)
 
int get_kernel_pages (const struct kvec *kiov, int nr_segs, int write, struct page **pages)
 
 EXPORT_SYMBOL_GPL (get_kernel_pages)
 
int get_kernel_page (unsigned long start, int write, struct page **pages)
 
 EXPORT_SYMBOL_GPL (get_kernel_page)
 
void rotate_reclaimable_page (struct page *page)
 
void activate_page (struct page *page)
 
void mark_page_accessed (struct page *page)
 
 EXPORT_SYMBOL (mark_page_accessed)
 
void __lru_cache_add (struct page *page, enum lru_list lru)
 
 EXPORT_SYMBOL (__lru_cache_add)
 
void lru_cache_add_lru (struct page *page, enum lru_list lru)
 
void add_page_to_unevictable_list (struct page *page)
 
void lru_add_drain_cpu (int cpu)
 
void deactivate_page (struct page *page)
 
void lru_add_drain (void)
 
int lru_add_drain_all (void)
 
void release_pages (struct page **pages, int nr, int cold)
 
 EXPORT_SYMBOL (release_pages)
 
void __pagevec_release (struct pagevec *pvec)
 
 EXPORT_SYMBOL (__pagevec_release)
 
void __pagevec_lru_add (struct pagevec *pvec, enum lru_list lru)
 
 EXPORT_SYMBOL (__pagevec_lru_add)
 
unsigned pagevec_lookup (struct pagevec *pvec, struct address_space *mapping, pgoff_t start, unsigned nr_pages)
 
 EXPORT_SYMBOL (pagevec_lookup)
 
unsigned pagevec_lookup_tag (struct pagevec *pvec, struct address_space *mapping, pgoff_t *index, int tag, unsigned nr_pages)
 
 EXPORT_SYMBOL (pagevec_lookup_tag)
 
void __init swap_setup (void)
 

Variables

int page_cluster
 

Function Documentation

bool __get_page_tail ( struct page page)

Definition at line 173 of file swap.c.

void __lru_cache_add ( struct page page,
enum lru_list  lru 
)

Definition at line 457 of file swap.c.

void __pagevec_lru_add ( struct pagevec pvec,
enum lru_list  lru 
)

Definition at line 811 of file swap.c.

void __pagevec_release ( struct pagevec pvec)

Definition at line 729 of file swap.c.

void activate_page ( struct page page)

Definition at line 420 of file swap.c.

void add_page_to_unevictable_list ( struct page page)

Definition at line 498 of file swap.c.

void deactivate_page ( struct page page)

Definition at line 620 of file swap.c.

EXPORT_SYMBOL ( put_page  )
EXPORT_SYMBOL ( __get_page_tail  )
EXPORT_SYMBOL ( put_pages_list  )
EXPORT_SYMBOL ( mark_page_accessed  )
EXPORT_SYMBOL ( __lru_cache_add  )
EXPORT_SYMBOL ( release_pages  )
EXPORT_SYMBOL ( __pagevec_release  )
EXPORT_SYMBOL ( __pagevec_lru_add  )
EXPORT_SYMBOL ( pagevec_lookup  )
EXPORT_SYMBOL ( pagevec_lookup_tag  )
EXPORT_SYMBOL_GPL ( get_kernel_pages  )
EXPORT_SYMBOL_GPL ( get_kernel_page  )
int get_kernel_page ( unsigned long  start,
int  write,
struct page **  pages 
)

Definition at line 280 of file swap.c.

int get_kernel_pages ( const struct kvec kiov,
int  nr_segs,
int  write,
struct page **  pages 
)

Definition at line 252 of file swap.c.

void lru_add_drain ( void  )

Definition at line 638 of file swap.c.

int lru_add_drain_all ( void  )

Definition at line 652 of file swap.c.

void lru_add_drain_cpu ( int  cpu)

Definition at line 583 of file swap.c.

void lru_cache_add_lru ( struct page page,
enum lru_list  lru 
)

Definition at line 474 of file swap.c.

void mark_page_accessed ( struct page page)

Definition at line 437 of file swap.c.

unsigned pagevec_lookup ( struct pagevec pvec,
struct address_space mapping,
pgoff_t  start,
unsigned  nr_pages 
)

pagevec_lookup - gang pagecache lookup : Where the resulting pages are placed : The address_space to search : The starting page index : The maximum number of pages

pagevec_lookup() will search for and return a group of up to pages in the mapping. The pages are placed in . pagevec_lookup() takes a reference against the pages in .

The search returns a group of mapping-contiguous pages with ascending indexes. There may be holes in the indices due to not-present pages.

pagevec_lookup() returns the number of pages which were found.

Definition at line 835 of file swap.c.

unsigned pagevec_lookup_tag ( struct pagevec pvec,
struct address_space mapping,
pgoff_t index,
int  tag,
unsigned  nr_pages 
)

Definition at line 843 of file swap.c.

void put_page ( struct page page)

Definition at line 160 of file swap.c.

void put_pages_list ( struct list_head pages)

put_pages_list() - release a list of pages : list of pages threaded on page->lru

Release a list of pages which are strung together on page.lru. Currently used by read_cache_pages() and related error recovery code.

Definition at line 227 of file swap.c.

void release_pages ( struct page **  pages,
int  nr,
int  cold 
)

Definition at line 670 of file swap.c.

void rotate_reclaimable_page ( struct page page)

Definition at line 349 of file swap.c.

void __init swap_setup ( void  )

Definition at line 855 of file swap.c.

Variable Documentation

int page_cluster

Definition at line 37 of file swap.c.