diff options
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index f512e189be5a..5e9840f50980 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 | ||
@@ -150,6 +151,10 @@ u64 mem_cgroup_get_limit(struct mem_cgroup *mem); | |||
150 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); | 151 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); |
151 | #endif | 152 | #endif |
152 | 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 | ||
153 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 158 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
154 | struct mem_cgroup; | 159 | struct mem_cgroup; |
155 | 160 | ||
@@ -211,6 +216,11 @@ static inline void mem_cgroup_del_lru_list(struct page *page, int lru) | |||
211 | return ; | 216 | return ; |
212 | } | 217 | } |
213 | 218 | ||
219 | static inline void mem_cgroup_rotate_reclaimable_page(struct page *page) | ||
220 | { | ||
221 | return ; | ||
222 | } | ||
223 | |||
214 | 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) |
215 | { | 225 | { |
216 | return ; | 226 | return ; |
@@ -249,7 +259,7 @@ static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem) | |||
249 | 259 | ||
250 | static inline int | 260 | static inline int |
251 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | 261 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, |
252 | struct mem_cgroup **ptr) | 262 | struct mem_cgroup **ptr, gfp_t gfp_mask) |
253 | { | 263 | { |
254 | return 0; | 264 | return 0; |
255 | } | 265 | } |
@@ -346,5 +356,18 @@ static inline void mem_cgroup_split_huge_fixup(struct page *head, | |||
346 | 356 | ||
347 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 357 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
348 | 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 | |||
349 | #endif /* _LINUX_MEMCONTROL_H */ | 372 | #endif /* _LINUX_MEMCONTROL_H */ |
350 | 373 | ||