diff options
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 5e9840f50980..9724a38ee69d 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _LINUX_MEMCONTROL_H | 20 | #ifndef _LINUX_MEMCONTROL_H |
21 | #define _LINUX_MEMCONTROL_H | 21 | #define _LINUX_MEMCONTROL_H |
22 | #include <linux/cgroup.h> | 22 | #include <linux/cgroup.h> |
23 | #include <linux/vm_event_item.h> | ||
24 | |||
23 | struct mem_cgroup; | 25 | struct mem_cgroup; |
24 | struct page_cgroup; | 26 | struct page_cgroup; |
25 | struct page; | 27 | struct page; |
@@ -106,9 +108,10 @@ extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | |||
106 | */ | 108 | */ |
107 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg); | 109 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg); |
108 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); | 110 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); |
109 | unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg, | 111 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); |
110 | struct zone *zone, | 112 | unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, |
111 | enum lru_list lru); | 113 | struct zone *zone, |
114 | enum lru_list lru); | ||
112 | struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, | 115 | struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, |
113 | struct zone *zone); | 116 | struct zone *zone); |
114 | struct zone_reclaim_stat* | 117 | struct zone_reclaim_stat* |
@@ -144,9 +147,11 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
144 | } | 147 | } |
145 | 148 | ||
146 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 149 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
147 | gfp_t gfp_mask); | 150 | gfp_t gfp_mask, |
151 | unsigned long *total_scanned); | ||
148 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); | 152 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); |
149 | 153 | ||
154 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); | ||
150 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 155 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
151 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); | 156 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); |
152 | #endif | 157 | #endif |
@@ -302,8 +307,8 @@ mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg) | |||
302 | } | 307 | } |
303 | 308 | ||
304 | static inline unsigned long | 309 | static inline unsigned long |
305 | mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg, struct zone *zone, | 310 | mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, struct zone *zone, |
306 | enum lru_list lru) | 311 | enum lru_list lru) |
307 | { | 312 | { |
308 | return 0; | 313 | return 0; |
309 | } | 314 | } |
@@ -338,7 +343,8 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
338 | 343 | ||
339 | static inline | 344 | static inline |
340 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 345 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
341 | gfp_t gfp_mask) | 346 | gfp_t gfp_mask, |
347 | unsigned long *total_scanned) | ||
342 | { | 348 | { |
343 | return 0; | 349 | return 0; |
344 | } | 350 | } |
@@ -354,6 +360,10 @@ static inline void mem_cgroup_split_huge_fixup(struct page *head, | |||
354 | { | 360 | { |
355 | } | 361 | } |
356 | 362 | ||
363 | static inline | ||
364 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) | ||
365 | { | ||
366 | } | ||
357 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 367 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
358 | 368 | ||
359 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) | 369 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) |