diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/memcontrol.h | 19 | ||||
| -rw-r--r-- | include/linux/swap.h | 6 |
2 files changed, 6 insertions, 19 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 3b535db00a94..343bd7661f2a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -39,16 +39,6 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | |||
| 39 | struct mem_cgroup *mem_cont, | 39 | struct mem_cgroup *mem_cont, |
| 40 | int active, int file); | 40 | int active, int file); |
| 41 | 41 | ||
| 42 | struct memcg_scanrecord { | ||
| 43 | struct mem_cgroup *mem; /* scanend memory cgroup */ | ||
| 44 | struct mem_cgroup *root; /* scan target hierarchy root */ | ||
| 45 | int context; /* scanning context (see memcontrol.c) */ | ||
| 46 | unsigned long nr_scanned[2]; /* the number of scanned pages */ | ||
| 47 | unsigned long nr_rotated[2]; /* the number of rotated pages */ | ||
| 48 | unsigned long nr_freed[2]; /* the number of freed pages */ | ||
| 49 | unsigned long elapsed; /* nsec of time elapsed while scanning */ | ||
| 50 | }; | ||
| 51 | |||
| 52 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 42 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
| 53 | /* | 43 | /* |
| 54 | * All "charge" functions with gfp_mask should use GFP_KERNEL or | 44 | * All "charge" functions with gfp_mask should use GFP_KERNEL or |
| @@ -127,15 +117,6 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page); | |||
| 127 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | 117 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, |
| 128 | struct task_struct *p); | 118 | struct task_struct *p); |
| 129 | 119 | ||
| 130 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | ||
| 131 | gfp_t gfp_mask, bool noswap, | ||
| 132 | struct memcg_scanrecord *rec); | ||
| 133 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, | ||
| 134 | gfp_t gfp_mask, bool noswap, | ||
| 135 | struct zone *zone, | ||
| 136 | struct memcg_scanrecord *rec, | ||
| 137 | unsigned long *nr_scanned); | ||
| 138 | |||
| 139 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
| 140 | extern int do_swap_account; | 121 | extern int do_swap_account; |
| 141 | #endif | 122 | #endif |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 14d62490922e..c71f84bb62ec 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -252,6 +252,12 @@ static inline void lru_cache_add_file(struct page *page) | |||
| 252 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | 252 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, |
| 253 | gfp_t gfp_mask, nodemask_t *mask); | 253 | gfp_t gfp_mask, nodemask_t *mask); |
| 254 | extern int __isolate_lru_page(struct page *page, int mode, int file); | 254 | extern int __isolate_lru_page(struct page *page, int mode, int file); |
| 255 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | ||
| 256 | gfp_t gfp_mask, bool noswap); | ||
| 257 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, | ||
| 258 | gfp_t gfp_mask, bool noswap, | ||
| 259 | struct zone *zone, | ||
| 260 | unsigned long *nr_scanned); | ||
| 255 | extern unsigned long shrink_all_memory(unsigned long nr_pages); | 261 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
| 256 | extern int vm_swappiness; | 262 | extern int vm_swappiness; |
| 257 | extern int remove_mapping(struct address_space *mapping, struct page *page); | 263 | extern int remove_mapping(struct address_space *mapping, struct page *page); |
