diff options
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index fdf3967e1397..1fbe14d39521 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -27,16 +27,13 @@ struct mm_struct; | |||
27 | 27 | ||
28 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 28 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
29 | 29 | ||
30 | #define page_reset_bad_cgroup(page) ((page)->page_cgroup = 0) | ||
31 | |||
32 | extern struct page_cgroup *page_get_page_cgroup(struct page *page); | ||
33 | extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, | 30 | extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, |
34 | gfp_t gfp_mask); | 31 | gfp_t gfp_mask); |
35 | extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | 32 | extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, |
36 | gfp_t gfp_mask); | 33 | gfp_t gfp_mask); |
34 | extern void mem_cgroup_move_lists(struct page *page, enum lru_list lru); | ||
37 | extern void mem_cgroup_uncharge_page(struct page *page); | 35 | extern void mem_cgroup_uncharge_page(struct page *page); |
38 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | 36 | extern void mem_cgroup_uncharge_cache_page(struct page *page); |
39 | extern void mem_cgroup_move_lists(struct page *page, bool active); | ||
40 | extern int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask); | 37 | extern int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask); |
41 | 38 | ||
42 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 39 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
@@ -44,7 +41,7 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | |||
44 | unsigned long *scanned, int order, | 41 | unsigned long *scanned, int order, |
45 | int mode, struct zone *z, | 42 | int mode, struct zone *z, |
46 | struct mem_cgroup *mem_cont, | 43 | struct mem_cgroup *mem_cont, |
47 | int active); | 44 | int active, int file); |
48 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); | 45 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); |
49 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); | 46 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); |
50 | 47 | ||
@@ -69,21 +66,11 @@ extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, | |||
69 | extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, | 66 | extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, |
70 | int priority); | 67 | int priority); |
71 | 68 | ||
72 | extern long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem, | 69 | extern long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, struct zone *zone, |
73 | struct zone *zone, int priority); | 70 | int priority, enum lru_list lru); |
74 | extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem, | ||
75 | struct zone *zone, int priority); | ||
76 | |||
77 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | ||
78 | static inline void page_reset_bad_cgroup(struct page *page) | ||
79 | { | ||
80 | } | ||
81 | 71 | ||
82 | static inline struct page_cgroup *page_get_page_cgroup(struct page *page) | ||
83 | { | ||
84 | return NULL; | ||
85 | } | ||
86 | 72 | ||
73 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | ||
87 | static inline int mem_cgroup_charge(struct page *page, | 74 | static inline int mem_cgroup_charge(struct page *page, |
88 | struct mm_struct *mm, gfp_t gfp_mask) | 75 | struct mm_struct *mm, gfp_t gfp_mask) |
89 | { | 76 | { |
@@ -159,14 +146,9 @@ static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, | |||
159 | { | 146 | { |
160 | } | 147 | } |
161 | 148 | ||
162 | static inline long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem, | 149 | static inline long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, |
163 | struct zone *zone, int priority) | 150 | struct zone *zone, int priority, |
164 | { | 151 | enum lru_list lru) |
165 | return 0; | ||
166 | } | ||
167 | |||
168 | static inline long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem, | ||
169 | struct zone *zone, int priority) | ||
170 | { | 152 | { |
171 | return 0; | 153 | return 0; |
172 | } | 154 | } |