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.h24
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,
35extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, 35extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
36 gfp_t gfp_mask); 36 gfp_t gfp_mask);
37extern void mem_cgroup_uncharge_page(struct page *page); 37extern void mem_cgroup_uncharge_page(struct page *page);
38extern void mem_cgroup_uncharge_cache_page(struct page *page);
38extern void mem_cgroup_move_lists(struct page *page, bool active); 39extern void mem_cgroup_move_lists(struct page *page, bool active);
40extern int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask);
41
39extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 42extern 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
53extern int mem_cgroup_prepare_migration(struct page *page); 56extern int
57mem_cgroup_prepare_migration(struct page *page, struct page *newpage);
54extern void mem_cgroup_end_migration(struct page *page); 58extern void mem_cgroup_end_migration(struct page *page);
55extern 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
103static inline void mem_cgroup_uncharge_cache_page(struct page *page)
104{
105}
106
107static inline int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask)
108{
109 return 0;
110}
111
100static inline void mem_cgroup_move_lists(struct page *page, bool active) 112static 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
115static inline int mem_cgroup_prepare_migration(struct page *page) 127static inline int
128mem_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
124static inline void
125mem_cgroup_page_migration(struct page *page, struct page *newpage)
126{
127}
128
129static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) 137static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem)
130{ 138{
131 return 0; 139 return 0;