diff options
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index e6608776bc96..fdf3967e1397 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -35,7 +35,10 @@ extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, | |||
35 | extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | 35 | extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, |
36 | gfp_t gfp_mask); | 36 | gfp_t gfp_mask); |
37 | extern void mem_cgroup_uncharge_page(struct page *page); | 37 | extern void mem_cgroup_uncharge_page(struct page *page); |
38 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | ||
38 | extern void mem_cgroup_move_lists(struct page *page, bool active); | 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); | ||
41 | |||
39 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 42 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
40 | struct list_head *dst, | 43 | struct list_head *dst, |
41 | unsigned long *scanned, int order, | 44 | unsigned long *scanned, int order, |
@@ -50,9 +53,9 @@ extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); | |||
50 | #define mm_match_cgroup(mm, cgroup) \ | 53 | #define mm_match_cgroup(mm, cgroup) \ |
51 | ((cgroup) == mem_cgroup_from_task((mm)->owner)) | 54 | ((cgroup) == mem_cgroup_from_task((mm)->owner)) |
52 | 55 | ||
53 | extern int mem_cgroup_prepare_migration(struct page *page); | 56 | extern int |
57 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage); | ||
54 | extern void mem_cgroup_end_migration(struct page *page); | 58 | extern void mem_cgroup_end_migration(struct page *page); |
55 | extern void mem_cgroup_page_migration(struct page *page, struct page *newpage); | ||
56 | 59 | ||
57 | /* | 60 | /* |
58 | * For memory reclaim. | 61 | * For memory reclaim. |
@@ -97,6 +100,15 @@ static inline void mem_cgroup_uncharge_page(struct page *page) | |||
97 | { | 100 | { |
98 | } | 101 | } |
99 | 102 | ||
103 | static inline void mem_cgroup_uncharge_cache_page(struct page *page) | ||
104 | { | ||
105 | } | ||
106 | |||
107 | static inline int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask) | ||
108 | { | ||
109 | return 0; | ||
110 | } | ||
111 | |||
100 | static inline void mem_cgroup_move_lists(struct page *page, bool active) | 112 | static inline void mem_cgroup_move_lists(struct page *page, bool active) |
101 | { | 113 | { |
102 | } | 114 | } |
@@ -112,7 +124,8 @@ static inline int task_in_mem_cgroup(struct task_struct *task, | |||
112 | return 1; | 124 | return 1; |
113 | } | 125 | } |
114 | 126 | ||
115 | static inline int mem_cgroup_prepare_migration(struct page *page) | 127 | static inline int |
128 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage) | ||
116 | { | 129 | { |
117 | return 0; | 130 | return 0; |
118 | } | 131 | } |
@@ -121,11 +134,6 @@ static inline void mem_cgroup_end_migration(struct page *page) | |||
121 | { | 134 | { |
122 | } | 135 | } |
123 | 136 | ||
124 | static inline void | ||
125 | mem_cgroup_page_migration(struct page *page, struct page *newpage) | ||
126 | { | ||
127 | } | ||
128 | |||
129 | static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) | 137 | static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) |
130 | { | 138 | { |
131 | return 0; | 139 | return 0; |