Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
vmscan.c File Reference
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/kernel_stat.h>
#include <linux/swap.h>
#include <linux/pagemap.h>
#include <linux/init.h>
#include <linux/highmem.h>
#include <linux/vmstat.h>
#include <linux/file.h>
#include <linux/writeback.h>
#include <linux/blkdev.h>
#include <linux/buffer_head.h>
#include <linux/mm_inline.h>
#include <linux/backing-dev.h>
#include <linux/rmap.h>
#include <linux/topology.h>
#include <linux/cpu.h>
#include <linux/cpuset.h>
#include <linux/compaction.h>
#include <linux/notifier.h>
#include <linux/rwsem.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/memcontrol.h>
#include <linux/delayacct.h>
#include <linux/sysctl.h>
#include <linux/oom.h>
#include <linux/prefetch.h>
#include <asm/tlbflush.h>
#include <asm/div64.h>
#include <linux/swapops.h>
#include "internal.h"
#include <trace/events/vmscan.h>

Go to the source code of this file.

Data Structures

struct  scan_control
 

Macros

#define CREATE_TRACE_POINTS
 
#define lru_to_page(_head)   (list_entry((_head)->prev, struct page, lru))
 
#define prefetch_prev_lru_page(_page, _base, _field)   do { } while (0)
 
#define prefetchw_prev_lru_page(_page, _base, _field)   do { } while (0)
 
#define SHRINK_BATCH   128
 

Enumerations

enum  pageout_t { PAGE_KEEP, PAGE_ACTIVATE, PAGE_SUCCESS, PAGE_CLEAN }
 
enum  page_references { PAGEREF_RECLAIM, PAGEREF_RECLAIM_CLEAN, PAGEREF_KEEP, PAGEREF_ACTIVATE }
 

Functions

void register_shrinker (struct shrinker *shrinker)
 
 EXPORT_SYMBOL (register_shrinker)
 
void unregister_shrinker (struct shrinker *shrinker)
 
 EXPORT_SYMBOL (unregister_shrinker)
 
unsigned long shrink_slab (struct shrink_control *shrink, unsigned long nr_pages_scanned, unsigned long lru_pages)
 
int remove_mapping (struct address_space *mapping, struct page *page)
 
void putback_lru_page (struct page *page)
 
unsigned long reclaim_clean_pages_from_list (struct zone *zone, struct list_head *page_list)
 
int __isolate_lru_page (struct page *page, isolate_mode_t mode)
 
int isolate_lru_page (struct page *page)
 
unsigned long try_to_free_pages (struct zonelist *zonelist, int order, gfp_t gfp_mask, nodemask_t *nodemask)
 
void wakeup_kswapd (struct zone *zone, int order, enum zone_type classzone_idx)
 
unsigned long global_reclaimable_pages (void)
 
unsigned long zone_reclaimable_pages (struct zone *zone)
 
int kswapd_run (int nid)
 
void kswapd_stop (int nid)
 
 module_init (kswapd_init)
 
int scan_unevictable_handler (struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos)
 

Variables

int vm_swappiness = 60
 
long vm_total_pages
 
unsigned long scan_unevictable_pages
 

Macro Definition Documentation

#define CREATE_TRACE_POINTS

Definition at line 53 of file vmscan.c.

#define lru_to_page (   _head)    (list_entry((_head)->prev, struct page, lru))

Definition at line 97 of file vmscan.c.

#define prefetch_prev_lru_page (   _page,
  _base,
  _field 
)    do { } while (0)

Definition at line 110 of file vmscan.c.

#define prefetchw_prev_lru_page (   _page,
  _base,
  _field 
)    do { } while (0)

Definition at line 124 of file vmscan.c.

#define SHRINK_BATCH   128

Definition at line 187 of file vmscan.c.

Enumeration Type Documentation

Enumerator:
PAGEREF_RECLAIM 
PAGEREF_RECLAIM_CLEAN 
PAGEREF_KEEP 
PAGEREF_ACTIVATE 

Definition at line 609 of file vmscan.c.

enum pageout_t
Enumerator:
PAGE_KEEP 
PAGE_ACTIVATE 
PAGE_SUCCESS 
PAGE_CLEAN 

Definition at line 362 of file vmscan.c.

Function Documentation

int __isolate_lru_page ( struct page page,
isolate_mode_t  mode 
)

Definition at line 1004 of file vmscan.c.

EXPORT_SYMBOL ( register_shrinker  )
EXPORT_SYMBOL ( unregister_shrinker  )
unsigned long global_reclaimable_pages ( void  )

Definition at line 3040 of file vmscan.c.

int isolate_lru_page ( struct page page)

Definition at line 1155 of file vmscan.c.

int kswapd_run ( int  nid)

Definition at line 3140 of file vmscan.c.

void kswapd_stop ( int  nid)

Definition at line 3163 of file vmscan.c.

module_init ( kswapd_init  )

Definition at line 3184 of file vmscan.c.

void putback_lru_page ( struct page page)

Definition at line 545 of file vmscan.c.

unsigned long reclaim_clean_pages_from_list ( struct zone zone,
struct list_head page_list 
)

Definition at line 967 of file vmscan.c.

void register_shrinker ( struct shrinker shrinker)

Definition at line 159 of file vmscan.c.

int remove_mapping ( struct address_space mapping,
struct page page 
)

Definition at line 522 of file vmscan.c.

int scan_unevictable_handler ( struct ctl_table table,
int  write,
void __user buffer,
size_t length,
loff_t *  ppos 
)

Definition at line 3484 of file vmscan.c.

unsigned long shrink_slab ( struct shrink_control shrink,
unsigned long  nr_pages_scanned,
unsigned long  lru_pages 
)

Definition at line 207 of file vmscan.c.

unsigned long try_to_free_pages ( struct zonelist zonelist,
int  order,
gfp_t  gfp_mask,
nodemask_t nodemask 
)

Definition at line 2275 of file vmscan.c.

void unregister_shrinker ( struct shrinker shrinker)

Definition at line 171 of file vmscan.c.

void wakeup_kswapd ( struct zone zone,
int  order,
enum zone_type  classzone_idx 
)

Definition at line 3010 of file vmscan.c.

unsigned long zone_reclaimable_pages ( struct zone zone)

Definition at line 3054 of file vmscan.c.

Variable Documentation

unsigned long scan_unevictable_pages

Definition at line 3482 of file vmscan.c.

int vm_swappiness = 60

Definition at line 130 of file vmscan.c.

long vm_total_pages

Definition at line 131 of file vmscan.c.