aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
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/memcontrol.c
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/memcontrol.c')
-rw-r--r--mm/memcontrol.c20
1 files changed, 10 insertions, 10 deletions
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 */