diff options
author | Johannes Weiner <jweiner@redhat.com> | 2011-09-14 19:21:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-14 21:09:38 -0400 |
commit | 185efc0f9a1f2d6ad6d4782c5d9e529f3290567f (patch) | |
tree | 9330dac6b7f17fad7d99e444b3544210109e2d99 /include/linux/memcontrol.h | |
parent | a4d3e9e76337059406fcf3ead288c0df22a790e9 (diff) |
memcg: Revert "memcg: add memory.vmscan_stat"
Revert the post-3.0 commit 82f9d486e59f5 ("memcg: add
memory.vmscan_stat").
The implementation of per-memcg reclaim statistics violates how memcg
hierarchies usually behave: hierarchically.
The reclaim statistics are accounted to child memcgs and the parent
hitting the limit, but not to hierarchy levels in between. Usually,
hierarchical statistics are perfectly recursive, with each level
representing the sum of itself and all its children.
Since this exports statistics to userspace, this may lead to confusion
and problems with changing things after the release, so revert it now,
we can try again later.
Signed-off-by: Johannes Weiner <jweiner@redhat.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Ying Han <yinghan@google.com>
Cc: Balbir Singh <bsingharora@gmail.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 | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 3b535db00a94..343bd7661f2a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -39,16 +39,6 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | |||
39 | struct mem_cgroup *mem_cont, | 39 | struct mem_cgroup *mem_cont, |
40 | int active, int file); | 40 | int active, int file); |
41 | 41 | ||
42 | struct memcg_scanrecord { | ||
43 | struct mem_cgroup *mem; /* scanend memory cgroup */ | ||
44 | struct mem_cgroup *root; /* scan target hierarchy root */ | ||
45 | int context; /* scanning context (see memcontrol.c) */ | ||
46 | unsigned long nr_scanned[2]; /* the number of scanned pages */ | ||
47 | unsigned long nr_rotated[2]; /* the number of rotated pages */ | ||
48 | unsigned long nr_freed[2]; /* the number of freed pages */ | ||
49 | unsigned long elapsed; /* nsec of time elapsed while scanning */ | ||
50 | }; | ||
51 | |||
52 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 42 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
53 | /* | 43 | /* |
54 | * All "charge" functions with gfp_mask should use GFP_KERNEL or | 44 | * All "charge" functions with gfp_mask should use GFP_KERNEL or |
@@ -127,15 +117,6 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page); | |||
127 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | 117 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, |
128 | struct task_struct *p); | 118 | struct task_struct *p); |
129 | 119 | ||
130 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | ||
131 | gfp_t gfp_mask, bool noswap, | ||
132 | struct memcg_scanrecord *rec); | ||
133 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, | ||
134 | gfp_t gfp_mask, bool noswap, | ||
135 | struct zone *zone, | ||
136 | struct memcg_scanrecord *rec, | ||
137 | unsigned long *nr_scanned); | ||
138 | |||
139 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
140 | extern int do_swap_account; | 121 | extern int do_swap_account; |
141 | #endif | 122 | #endif |