diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2009-12-15 19:47:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:07 -0500 |
commit | d8046582d5ee24448800e71c6933fdb6813aa062 (patch) | |
tree | 857d014a850deee5ddb6da6550d81ce0122f03b1 /include/linux/memcontrol.h | |
parent | cdec2e4265dfa09490601b00aeabd8a8d4af30f0 (diff) |
memcg: make memcg's file mapped consistent with global VM
In global VM, FILE_MAPPED is used but memcg uses MAPPED_FILE. This makes
grep difficult. Replace memcg's MAPPED_FILE with FILE_MAPPED
And in global VM, mapped shared memory is accounted into FILE_MAPPED.
But memcg doesn't. fix it.
Note:
page_is_file_cache() just checks SwapBacked or not.
So, we need to check PageAnon.
Cc: Balbir Singh <balbir@in.ibm.com>
Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 91300c972e76..0b46c2068b96 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -122,7 +122,7 @@ static inline bool mem_cgroup_disabled(void) | |||
122 | } | 122 | } |
123 | 123 | ||
124 | extern bool mem_cgroup_oom_called(struct task_struct *task); | 124 | extern bool mem_cgroup_oom_called(struct task_struct *task); |
125 | void mem_cgroup_update_mapped_file_stat(struct page *page, int val); | 125 | void mem_cgroup_update_file_mapped(struct page *page, int val); |
126 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 126 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
127 | gfp_t gfp_mask, int nid, | 127 | gfp_t gfp_mask, int nid, |
128 | int zid); | 128 | int zid); |
@@ -287,7 +287,7 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) | |||
287 | { | 287 | { |
288 | } | 288 | } |
289 | 289 | ||
290 | static inline void mem_cgroup_update_mapped_file_stat(struct page *page, | 290 | static inline void mem_cgroup_update_file_mapped(struct page *page, |
291 | int val) | 291 | int val) |
292 | { | 292 | { |
293 | } | 293 | } |