History

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.

Johannes Weiner committed 15 years ago

Commit 185efc01 parent a4d3e9e5 files · +18 −303Browse files

Showing the changes to include/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/memcontrol.h +0 −19
  2. include/linux/swap.h +6 −0
include/linux/memcontrol.h+0−19
@@ -39,16 +39,6 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, · 38 unmodified lines
3939 struct mem_cgroup *mem_cont,
4040 int active, int file);
4141
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−
5242 #ifdef CONFIG_CGROUP_MEM_RES_CTLR
5343 /*
5444 * 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); · 72 unmodified lines
127117 extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
128118 struct task_struct *p);
129119
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−
139120 #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
140121 extern int do_swap_account;
141122 #endif
include/linux/swap.h+6−0
@@ -252,6 +252,12 @@ static inline void lru_cache_add_file(struct page *page) · 251 unmodified lines
252252 extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
253253 gfp_t gfp_mask, nodemask_t *mask);
254254 extern int __isolate_lru_page(struct page *page, int mode, int file);
255+extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
256+ gfp_t gfp_mask, bool noswap);
257+extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
258+ gfp_t gfp_mask, bool noswap,
259+ struct zone *zone,
260+ unsigned long *nr_scanned);
255261 extern unsigned long shrink_all_memory(unsigned long nr_pages);
256262 extern int vm_swappiness;
257263 extern int remove_mapping(struct address_space *mapping, struct page *page);