diff options
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 6a576f989437..5a5ce7055839 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -62,6 +62,7 @@ extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | |||
62 | gfp_t gfp_mask); | 62 | gfp_t gfp_mask); |
63 | extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru); | 63 | extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru); |
64 | extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru); | 64 | extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru); |
65 | extern void mem_cgroup_rotate_reclaimable_page(struct page *page); | ||
65 | extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru); | 66 | extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru); |
66 | extern void mem_cgroup_del_lru(struct page *page); | 67 | extern void mem_cgroup_del_lru(struct page *page); |
67 | extern void mem_cgroup_move_lists(struct page *page, | 68 | extern void mem_cgroup_move_lists(struct page *page, |
@@ -96,7 +97,7 @@ extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem); | |||
96 | 97 | ||
97 | extern int | 98 | extern int |
98 | mem_cgroup_prepare_migration(struct page *page, | 99 | mem_cgroup_prepare_migration(struct page *page, |
99 | struct page *newpage, struct mem_cgroup **ptr); | 100 | struct page *newpage, struct mem_cgroup **ptr, gfp_t gfp_mask); |
100 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | 101 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, |
101 | struct page *oldpage, struct page *newpage, bool migration_ok); | 102 | struct page *oldpage, struct page *newpage, bool migration_ok); |
102 | 103 | ||
@@ -146,6 +147,14 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | |||
146 | gfp_t gfp_mask); | 147 | gfp_t gfp_mask); |
147 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); | 148 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); |
148 | 149 | ||
150 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
151 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); | ||
152 | #endif | ||
153 | |||
154 | #ifdef CONFIG_DEBUG_VM | ||
155 | bool mem_cgroup_bad_page_check(struct page *page); | ||
156 | void mem_cgroup_print_bad_page(struct page *page); | ||
157 | #endif | ||
149 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 158 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
150 | struct mem_cgroup; | 159 | struct mem_cgroup; |
151 | 160 | ||
@@ -207,6 +216,11 @@ static inline void mem_cgroup_del_lru_list(struct page *page, int lru) | |||
207 | return ; | 216 | return ; |
208 | } | 217 | } |
209 | 218 | ||
219 | static inline inline void mem_cgroup_rotate_reclaimable_page(struct page *page) | ||
220 | { | ||
221 | return ; | ||
222 | } | ||
223 | |||
210 | static inline void mem_cgroup_rotate_lru_list(struct page *page, int lru) | 224 | static inline void mem_cgroup_rotate_lru_list(struct page *page, int lru) |
211 | { | 225 | { |
212 | return ; | 226 | return ; |
@@ -245,7 +259,7 @@ static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem) | |||
245 | 259 | ||
246 | static inline int | 260 | static inline int |
247 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | 261 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, |
248 | struct mem_cgroup **ptr) | 262 | struct mem_cgroup **ptr, gfp_t gfp_mask) |
249 | { | 263 | { |
250 | return 0; | 264 | return 0; |
251 | } | 265 | } |
@@ -335,7 +349,25 @@ u64 mem_cgroup_get_limit(struct mem_cgroup *mem) | |||
335 | return 0; | 349 | return 0; |
336 | } | 350 | } |
337 | 351 | ||
352 | static inline void mem_cgroup_split_huge_fixup(struct page *head, | ||
353 | struct page *tail) | ||
354 | { | ||
355 | } | ||
356 | |||
338 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 357 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
339 | 358 | ||
359 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) | ||
360 | static inline bool | ||
361 | mem_cgroup_bad_page_check(struct page *page) | ||
362 | { | ||
363 | return false; | ||
364 | } | ||
365 | |||
366 | static inline void | ||
367 | mem_cgroup_print_bad_page(struct page *page) | ||
368 | { | ||
369 | } | ||
370 | #endif | ||
371 | |||
340 | #endif /* _LINUX_MEMCONTROL_H */ | 372 | #endif /* _LINUX_MEMCONTROL_H */ |
341 | 373 | ||