aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memcontrol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r--include/linux/memcontrol.h27
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);
63extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru); 63extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru);
64extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru); 64extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru);
65extern void mem_cgroup_rotate_reclaimable_page(struct page *page);
65extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru); 66extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru);
66extern void mem_cgroup_del_lru(struct page *page); 67extern void mem_cgroup_del_lru(struct page *page);
67extern void mem_cgroup_move_lists(struct page *page, 68extern 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
97extern int 98extern int
98mem_cgroup_prepare_migration(struct page *page, 99mem_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);
100extern void mem_cgroup_end_migration(struct mem_cgroup *mem, 101extern 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);
150void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); 151void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail);
151#endif 152#endif
152 153
154#ifdef CONFIG_DEBUG_VM
155bool mem_cgroup_bad_page_check(struct page *page);
156void mem_cgroup_print_bad_page(struct page *page);
157#endif
153#else /* CONFIG_CGROUP_MEM_RES_CTLR */ 158#else /* CONFIG_CGROUP_MEM_RES_CTLR */
154struct mem_cgroup; 159struct 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
219static inline void mem_cgroup_rotate_reclaimable_page(struct page *page)
220{
221 return ;
222}
223
214static inline void mem_cgroup_rotate_lru_list(struct page *page, int lru) 224static 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
250static inline int 260static inline int
251mem_cgroup_prepare_migration(struct page *page, struct page *newpage, 261mem_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)
360static inline bool
361mem_cgroup_bad_page_check(struct page *page)
362{
363 return false;
364}
365
366static inline void
367mem_cgroup_print_bad_page(struct page *page)
368{
369}
370#endif
371
349#endif /* _LINUX_MEMCONTROL_H */ 372#endif /* _LINUX_MEMCONTROL_H */
350 373