aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2012-07-31 19:43:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 21:42:43 -0400
commitc255a458055e459f65eb7b7f51dc5dbdd0caf1d8 (patch)
treeb143b1914eeb6f27f53e30f9f0275d0f1ca5480b /mm
parent80934513b230bfcf70265f2ef0fdae89fb391633 (diff)
memcg: rename config variables
Sanity: CONFIG_CGROUP_MEM_RES_CTLR -> CONFIG_MEMCG CONFIG_CGROUP_MEM_RES_CTLR_SWAP -> CONFIG_MEMCG_SWAP CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED -> CONFIG_MEMCG_SWAP_ENABLED CONFIG_CGROUP_MEM_RES_CTLR_KMEM -> CONFIG_MEMCG_KMEM [mhocko@suse.cz: fix missed bits] Cc: Glauber Costa <glommer@parallels.com> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Hugh Dickins <hughd@google.com> Cc: Tejun Heo <tj@kernel.org> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.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 'mm')
-rw-r--r--mm/Makefile2
-rw-r--r--mm/hwpoison-inject.c2
-rw-r--r--mm/memcontrol.c20
-rw-r--r--mm/memory-failure.c2
-rw-r--r--mm/mmzone.c2
-rw-r--r--mm/oom_kill.c2
-rw-r--r--mm/page_cgroup.c2
-rw-r--r--mm/vmscan.c4
8 files changed, 18 insertions, 18 deletions
diff --git a/mm/Makefile b/mm/Makefile
index fd6fc1c1966c..290bbfe33698 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -49,7 +49,7 @@ obj-$(CONFIG_FS_XIP) += filemap_xip.o
49obj-$(CONFIG_MIGRATION) += migrate.o 49obj-$(CONFIG_MIGRATION) += migrate.o
50obj-$(CONFIG_QUICKLIST) += quicklist.o 50obj-$(CONFIG_QUICKLIST) += quicklist.o
51obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o 51obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o
52obj-$(CONFIG_CGROUP_MEM_RES_CTLR) += memcontrol.o page_cgroup.o 52obj-$(CONFIG_MEMCG) += memcontrol.o page_cgroup.o
53obj-$(CONFIG_CGROUP_HUGETLB) += hugetlb_cgroup.o 53obj-$(CONFIG_CGROUP_HUGETLB) += hugetlb_cgroup.o
54obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o 54obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o
55obj-$(CONFIG_HWPOISON_INJECT) += hwpoison-inject.o 55obj-$(CONFIG_HWPOISON_INJECT) += hwpoison-inject.o
diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c
index cc448bb983ba..3a61efc518d5 100644
--- a/mm/hwpoison-inject.c
+++ b/mm/hwpoison-inject.c
@@ -123,7 +123,7 @@ static int pfn_inject_init(void)
123 if (!dentry) 123 if (!dentry)
124 goto fail; 124 goto fail;
125 125
126#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 126#ifdef CONFIG_MEMCG_SWAP
127 dentry = debugfs_create_u64("corrupt-filter-memcg", 0600, 127 dentry = debugfs_create_u64("corrupt-filter-memcg", 0600,
128 hwpoison_dir, &hwpoison_filter_memcg); 128 hwpoison_dir, &hwpoison_filter_memcg);
129 if (!dentry) 129 if (!dentry)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a2677e0a6387..55a85e1a342f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -61,12 +61,12 @@ struct cgroup_subsys mem_cgroup_subsys __read_mostly;
61#define MEM_CGROUP_RECLAIM_RETRIES 5 61#define MEM_CGROUP_RECLAIM_RETRIES 5
62static struct mem_cgroup *root_mem_cgroup __read_mostly; 62static struct mem_cgroup *root_mem_cgroup __read_mostly;
63 63
64#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 64#ifdef CONFIG_MEMCG_SWAP
65/* Turned on only when memory cgroup is enabled && really_do_swap_account = 1 */ 65/* Turned on only when memory cgroup is enabled && really_do_swap_account = 1 */
66int do_swap_account __read_mostly; 66int do_swap_account __read_mostly;
67 67
68/* for remember boot option*/ 68/* for remember boot option*/
69#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED 69#ifdef CONFIG_MEMCG_SWAP_ENABLED
70static int really_do_swap_account __initdata = 1; 70static int really_do_swap_account __initdata = 1;
71#else 71#else
72static int really_do_swap_account __initdata = 0; 72static int really_do_swap_account __initdata = 0;
@@ -407,7 +407,7 @@ static void mem_cgroup_get(struct mem_cgroup *memcg);
407static void mem_cgroup_put(struct mem_cgroup *memcg); 407static void mem_cgroup_put(struct mem_cgroup *memcg);
408 408
409/* Writing them here to avoid exposing memcg's inner layout */ 409/* Writing them here to avoid exposing memcg's inner layout */
410#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 410#ifdef CONFIG_MEMCG_KMEM
411#include <net/sock.h> 411#include <net/sock.h>
412#include <net/ip.h> 412#include <net/ip.h>
413 413
@@ -466,9 +466,9 @@ struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg)
466} 466}
467EXPORT_SYMBOL(tcp_proto_cgroup); 467EXPORT_SYMBOL(tcp_proto_cgroup);
468#endif /* CONFIG_INET */ 468#endif /* CONFIG_INET */
469#endif /* CONFIG_CGROUP_MEM_RES_CTLR_KMEM */ 469#endif /* CONFIG_MEMCG_KMEM */
470 470
471#if defined(CONFIG_INET) && defined(CONFIG_CGROUP_MEM_RES_CTLR_KMEM) 471#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)
472static void disarm_sock_keys(struct mem_cgroup *memcg) 472static void disarm_sock_keys(struct mem_cgroup *memcg)
473{ 473{
474 if (!memcg_proto_activated(&memcg->tcp_mem.cg_proto)) 474 if (!memcg_proto_activated(&memcg->tcp_mem.cg_proto))
@@ -3085,7 +3085,7 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout)
3085} 3085}
3086#endif 3086#endif
3087 3087
3088#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 3088#ifdef CONFIG_MEMCG_SWAP
3089/* 3089/*
3090 * called from swap_entry_free(). remove record in swap_cgroup and 3090 * called from swap_entry_free(). remove record in swap_cgroup and
3091 * uncharge "memsw" account. 3091 * uncharge "memsw" account.
@@ -4518,7 +4518,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
4518 return 0; 4518 return 0;
4519} 4519}
4520 4520
4521#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 4521#ifdef CONFIG_MEMCG_KMEM
4522static int memcg_init_kmem(struct mem_cgroup *memcg, struct cgroup_subsys *ss) 4522static int memcg_init_kmem(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
4523{ 4523{
4524 return mem_cgroup_sockets_init(memcg, ss); 4524 return mem_cgroup_sockets_init(memcg, ss);
@@ -4608,7 +4608,7 @@ static struct cftype mem_cgroup_files[] = {
4608 .read_seq_string = mem_control_numa_stat_show, 4608 .read_seq_string = mem_control_numa_stat_show,
4609 }, 4609 },
4610#endif 4610#endif
4611#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 4611#ifdef CONFIG_MEMCG_SWAP
4612 { 4612 {
4613 .name = "memsw.usage_in_bytes", 4613 .name = "memsw.usage_in_bytes",
4614 .private = MEMFILE_PRIVATE(_MEMSWAP, RES_USAGE), 4614 .private = MEMFILE_PRIVATE(_MEMSWAP, RES_USAGE),
@@ -4795,7 +4795,7 @@ struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg)
4795} 4795}
4796EXPORT_SYMBOL(parent_mem_cgroup); 4796EXPORT_SYMBOL(parent_mem_cgroup);
4797 4797
4798#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 4798#ifdef CONFIG_MEMCG_SWAP
4799static void __init enable_swap_cgroup(void) 4799static void __init enable_swap_cgroup(void)
4800{ 4800{
4801 if (!mem_cgroup_disabled() && really_do_swap_account) 4801 if (!mem_cgroup_disabled() && really_do_swap_account)
@@ -5526,7 +5526,7 @@ struct cgroup_subsys mem_cgroup_subsys = {
5526 .__DEPRECATED_clear_css_refs = true, 5526 .__DEPRECATED_clear_css_refs = true,
5527}; 5527};
5528 5528
5529#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 5529#ifdef CONFIG_MEMCG_SWAP
5530static int __init enable_swap_account(char *s) 5530static int __init enable_swap_account(char *s)
5531{ 5531{
5532 /* consider enabled if no parameter or 1 is given */ 5532 /* consider enabled if no parameter or 1 is given */
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index b04ff2d6f73d..a6e2141a6610 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -128,7 +128,7 @@ static int hwpoison_filter_flags(struct page *p)
128 * can only guarantee that the page either belongs to the memcg tasks, or is 128 * can only guarantee that the page either belongs to the memcg tasks, or is
129 * a freed page. 129 * a freed page.
130 */ 130 */
131#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 131#ifdef CONFIG_MEMCG_SWAP
132u64 hwpoison_filter_memcg; 132u64 hwpoison_filter_memcg;
133EXPORT_SYMBOL_GPL(hwpoison_filter_memcg); 133EXPORT_SYMBOL_GPL(hwpoison_filter_memcg);
134static int hwpoison_filter_task(struct page *p) 134static int hwpoison_filter_task(struct page *p)
diff --git a/mm/mmzone.c b/mm/mmzone.c
index 6830eab5bf09..3cef80f6ac79 100644
--- a/mm/mmzone.c
+++ b/mm/mmzone.c
@@ -96,7 +96,7 @@ void lruvec_init(struct lruvec *lruvec, struct zone *zone)
96 for_each_lru(lru) 96 for_each_lru(lru)
97 INIT_LIST_HEAD(&lruvec->lists[lru]); 97 INIT_LIST_HEAD(&lruvec->lists[lru]);
98 98
99#ifdef CONFIG_CGROUP_MEM_RES_CTLR 99#ifdef CONFIG_MEMCG
100 lruvec->zone = zone; 100 lruvec->zone = zone;
101#endif 101#endif
102} 102}
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index c82ede69bf3f..e6c10640e56b 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -541,7 +541,7 @@ static void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask,
541 sysctl_panic_on_oom == 2 ? "compulsory" : "system-wide"); 541 sysctl_panic_on_oom == 2 ? "compulsory" : "system-wide");
542} 542}
543 543
544#ifdef CONFIG_CGROUP_MEM_RES_CTLR 544#ifdef CONFIG_MEMCG
545void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, 545void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
546 int order) 546 int order)
547{ 547{
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index eb750f851395..5ddad0c6daa6 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -317,7 +317,7 @@ void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
317#endif 317#endif
318 318
319 319
320#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 320#ifdef CONFIG_MEMCG_SWAP
321 321
322static DEFINE_MUTEX(swap_cgroup_mutex); 322static DEFINE_MUTEX(swap_cgroup_mutex);
323struct swap_cgroup_ctrl { 323struct swap_cgroup_ctrl {
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 347b3ff2a478..6b1f89a91212 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -133,7 +133,7 @@ long vm_total_pages; /* The total number of pages which the VM controls */
133static LIST_HEAD(shrinker_list); 133static LIST_HEAD(shrinker_list);
134static DECLARE_RWSEM(shrinker_rwsem); 134static DECLARE_RWSEM(shrinker_rwsem);
135 135
136#ifdef CONFIG_CGROUP_MEM_RES_CTLR 136#ifdef CONFIG_MEMCG
137static bool global_reclaim(struct scan_control *sc) 137static bool global_reclaim(struct scan_control *sc)
138{ 138{
139 return !sc->target_mem_cgroup; 139 return !sc->target_mem_cgroup;
@@ -2142,7 +2142,7 @@ unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
2142 return nr_reclaimed; 2142 return nr_reclaimed;
2143} 2143}
2144 2144
2145#ifdef CONFIG_CGROUP_MEM_RES_CTLR 2145#ifdef CONFIG_MEMCG
2146 2146
2147unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *memcg, 2147unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *memcg,
2148 gfp_t gfp_mask, bool noswap, 2148 gfp_t gfp_mask, bool noswap,