diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2009-01-07 21:08:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:08 -0500 |
commit | a3d8e0549d913e30968fa02e505dfe02c0a23e0d (patch) | |
tree | e4d3df33666a18614289ae7bc76c27ad7950eb73 /include/linux/memcontrol.h | |
parent | 14797e2363c2b2f1ce139fd1c5a215e4e05aa1d9 (diff) |
memcg: add mem_cgroup_zone_nr_pages()
Introduce mem_cgroup_zone_nr_pages(). It is called by zone_nr_pages()
helper function.
This patch doesn't have any behavior change.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index aad9377c9828..b1defd6a2783 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -102,6 +102,9 @@ extern long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, struct zone *zone, | |||
102 | int priority, enum lru_list lru); | 102 | int priority, enum lru_list lru); |
103 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, | 103 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, |
104 | struct zone *zone); | 104 | struct zone *zone); |
105 | unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg, | ||
106 | struct zone *zone, | ||
107 | enum lru_list lru); | ||
105 | 108 | ||
106 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 109 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
107 | extern int do_swap_account; | 110 | extern int do_swap_account; |
@@ -260,6 +263,14 @@ mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, struct zone *zone) | |||
260 | return 1; | 263 | return 1; |
261 | } | 264 | } |
262 | 265 | ||
266 | static inline unsigned long | ||
267 | mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg, struct zone *zone, | ||
268 | enum lru_list lru) | ||
269 | { | ||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | |||
263 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 274 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
264 | 275 | ||
265 | #endif /* _LINUX_MEMCONTROL_H */ | 276 | #endif /* _LINUX_MEMCONTROL_H */ |