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
39 struct mem_cgroup *mem_cont,39 struct mem_cgroup *mem_cont,
40 int active, int file);40 int active, int file);
41 41
42struct 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_CTLR42#ifdef CONFIG_CGROUP_MEM_RES_CTLR
53/*43/*
54 * All "charge" functions with gfp_mask should use GFP_KERNEL or44 * 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
127extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,117extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
128 struct task_struct *p);118 struct task_struct *p);
129 119
130extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
131 gfp_t gfp_mask, bool noswap,
132 struct memcg_scanrecord *rec);
133extern 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_SWAP120#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
140extern int do_swap_account;121extern int do_swap_account;
141#endif122#endif
include/linux/swap.h+6−0
@@ -252,6 +252,12 @@ static inline void lru_cache_add_file(struct page *page) · 251 unmodified lines
252extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,252extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
253 gfp_t gfp_mask, nodemask_t *mask);253 gfp_t gfp_mask, nodemask_t *mask);
254extern int __isolate_lru_page(struct page *page, int mode, int file);254extern int __isolate_lru_page(struct page *page, int mode, int file);
255extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
256 gfp_t gfp_mask, bool noswap);
257extern 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);
255extern unsigned long shrink_all_memory(unsigned long nr_pages);261extern unsigned long shrink_all_memory(unsigned long nr_pages);
256extern int vm_swappiness;262extern int vm_swappiness;
257extern int remove_mapping(struct address_space *mapping, struct page *page);263extern int remove_mapping(struct address_space *mapping, struct page *page);