aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--Documentation/cgroups/memory.txt10
-rw-r--r--arch/powerpc/configs/chroma_defconfig4
-rw-r--r--arch/s390/defconfig2
-rw-r--r--arch/sh/configs/apsh4ad0a_defconfig2
-rw-r--r--arch/sh/configs/sdk7786_defconfig4
-rw-r--r--arch/sh/configs/se7206_defconfig2
-rw-r--r--arch/sh/configs/shx3_defconfig2
-rw-r--r--arch/sh/configs/urquell_defconfig4
-rw-r--r--arch/tile/configs/tilegx_defconfig4
-rw-r--r--arch/tile/configs/tilepro_defconfig4
-rw-r--r--arch/um/defconfig8
-rw-r--r--include/linux/cgroup_subsys.h2
-rw-r--r--include/linux/memcontrol.h14
-rw-r--r--include/linux/mmzone.h8
-rw-r--r--include/linux/page_cgroup.h10
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/swap.h6
-rw-r--r--include/net/sock.h4
-rw-r--r--init/Kconfig14
-rw-r--r--kernel/fork.c2
-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
-rw-r--r--net/core/sock.c2
-rw-r--r--net/ipv4/Makefile2
-rw-r--r--net/ipv4/sysctl_net_ipv4.c4
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv6/tcp_ipv6.c2
33 files changed, 78 insertions, 78 deletions
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index dd88540bb995..672676ac9615 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -187,12 +187,12 @@ the cgroup that brought it in -- this will happen on memory pressure).
187But see section 8.2: when moving a task to another cgroup, its pages may 187But see section 8.2: when moving a task to another cgroup, its pages may
188be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. 188be recharged to the new cgroup, if move_charge_at_immigrate has been chosen.
189 189
190Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. 190Exception: If CONFIG_CGROUP_CGROUP_MEMCG_SWAP is not used.
191When you do swapoff and make swapped-out pages of shmem(tmpfs) to 191When you do swapoff and make swapped-out pages of shmem(tmpfs) to
192be backed into memory in force, charges for pages are accounted against the 192be backed into memory in force, charges for pages are accounted against the
193caller of swapoff rather than the users of shmem. 193caller of swapoff rather than the users of shmem.
194 194
1952.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) 1952.4 Swap Extension (CONFIG_MEMCG_SWAP)
196 196
197Swap Extension allows you to record charge for swap. A swapped-in page is 197Swap Extension allows you to record charge for swap. A swapped-in page is
198charged back to original page allocator if possible. 198charged back to original page allocator if possible.
@@ -259,7 +259,7 @@ When oom event notifier is registered, event will be delivered.
259 per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by 259 per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by
260 zone->lru_lock, it has no lock of its own. 260 zone->lru_lock, it has no lock of its own.
261 261
2622.7 Kernel Memory Extension (CONFIG_CGROUP_MEM_RES_CTLR_KMEM) 2622.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM)
263 263
264With the Kernel memory extension, the Memory Controller is able to limit 264With the Kernel memory extension, the Memory Controller is able to limit
265the amount of kernel memory used by the system. Kernel memory is fundamentally 265the amount of kernel memory used by the system. Kernel memory is fundamentally
@@ -286,8 +286,8 @@ per cgroup, instead of globally.
286 286
287a. Enable CONFIG_CGROUPS 287a. Enable CONFIG_CGROUPS
288b. Enable CONFIG_RESOURCE_COUNTERS 288b. Enable CONFIG_RESOURCE_COUNTERS
289c. Enable CONFIG_CGROUP_MEM_RES_CTLR 289c. Enable CONFIG_MEMCG
290d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension) 290d. Enable CONFIG_MEMCG_SWAP (to use swap extension)
291 291
2921. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) 2921. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
293# mount -t tmpfs none /sys/fs/cgroup 293# mount -t tmpfs none /sys/fs/cgroup
diff --git a/arch/powerpc/configs/chroma_defconfig b/arch/powerpc/configs/chroma_defconfig
index b1f9597fe312..29bb11ec6c64 100644
--- a/arch/powerpc/configs/chroma_defconfig
+++ b/arch/powerpc/configs/chroma_defconfig
@@ -21,8 +21,8 @@ CONFIG_CGROUP_DEVICE=y
21CONFIG_CPUSETS=y 21CONFIG_CPUSETS=y
22CONFIG_CGROUP_CPUACCT=y 22CONFIG_CGROUP_CPUACCT=y
23CONFIG_RESOURCE_COUNTERS=y 23CONFIG_RESOURCE_COUNTERS=y
24CONFIG_CGROUP_MEM_RES_CTLR=y 24CONFIG_CGROUP_MEMCG=y
25CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 25CONFIG_CGROUP_MEMCG_SWAP=y
26CONFIG_NAMESPACES=y 26CONFIG_NAMESPACES=y
27CONFIG_RELAY=y 27CONFIG_RELAY=y
28CONFIG_BLK_DEV_INITRD=y 28CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 37d2bf267964..de57702a3f44 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -13,7 +13,7 @@ CONFIG_CGROUPS=y
13CONFIG_CPUSETS=y 13CONFIG_CPUSETS=y
14CONFIG_CGROUP_CPUACCT=y 14CONFIG_CGROUP_CPUACCT=y
15CONFIG_RESOURCE_COUNTERS=y 15CONFIG_RESOURCE_COUNTERS=y
16CONFIG_CGROUP_MEM_RES_CTLR=y 16CONFIG_CGROUP_MEMCG=y
17CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 17CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
18CONFIG_CGROUP_SCHED=y 18CONFIG_CGROUP_SCHED=y
19CONFIG_RT_GROUP_SCHED=y 19CONFIG_RT_GROUP_SCHED=y
diff --git a/arch/sh/configs/apsh4ad0a_defconfig b/arch/sh/configs/apsh4ad0a_defconfig
index e7583484cc07..95ae23fcfdd6 100644
--- a/arch/sh/configs/apsh4ad0a_defconfig
+++ b/arch/sh/configs/apsh4ad0a_defconfig
@@ -11,7 +11,7 @@ CONFIG_CGROUP_FREEZER=y
11CONFIG_CGROUP_DEVICE=y 11CONFIG_CGROUP_DEVICE=y
12CONFIG_CGROUP_CPUACCT=y 12CONFIG_CGROUP_CPUACCT=y
13CONFIG_RESOURCE_COUNTERS=y 13CONFIG_RESOURCE_COUNTERS=y
14CONFIG_CGROUP_MEM_RES_CTLR=y 14CONFIG_CGROUP_MEMCG=y
15CONFIG_BLK_CGROUP=y 15CONFIG_BLK_CGROUP=y
16CONFIG_NAMESPACES=y 16CONFIG_NAMESPACES=y
17CONFIG_BLK_DEV_INITRD=y 17CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_defconfig
index 8a7dd7b59c5c..76a76a295d74 100644
--- a/arch/sh/configs/sdk7786_defconfig
+++ b/arch/sh/configs/sdk7786_defconfig
@@ -18,8 +18,8 @@ CONFIG_CPUSETS=y
18# CONFIG_PROC_PID_CPUSET is not set 18# CONFIG_PROC_PID_CPUSET is not set
19CONFIG_CGROUP_CPUACCT=y 19CONFIG_CGROUP_CPUACCT=y
20CONFIG_RESOURCE_COUNTERS=y 20CONFIG_RESOURCE_COUNTERS=y
21CONFIG_CGROUP_MEM_RES_CTLR=y 21CONFIG_CGROUP_MEMCG=y
22CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 22CONFIG_CGROUP_MEMCG_SWAP=y
23CONFIG_CGROUP_SCHED=y 23CONFIG_CGROUP_SCHED=y
24CONFIG_RT_GROUP_SCHED=y 24CONFIG_RT_GROUP_SCHED=y
25CONFIG_BLK_CGROUP=y 25CONFIG_BLK_CGROUP=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index 72c3fad7383f..6bc30ab9fd18 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_defconfig
@@ -11,7 +11,7 @@ CONFIG_CGROUP_DEBUG=y
11CONFIG_CGROUP_DEVICE=y 11CONFIG_CGROUP_DEVICE=y
12CONFIG_CGROUP_CPUACCT=y 12CONFIG_CGROUP_CPUACCT=y
13CONFIG_RESOURCE_COUNTERS=y 13CONFIG_RESOURCE_COUNTERS=y
14CONFIG_CGROUP_MEM_RES_CTLR=y 14CONFIG_CGROUP_MEMCG=y
15CONFIG_RELAY=y 15CONFIG_RELAY=y
16CONFIG_NAMESPACES=y 16CONFIG_NAMESPACES=y
17CONFIG_UTS_NS=y 17CONFIG_UTS_NS=y
diff --git a/arch/sh/configs/shx3_defconfig b/arch/sh/configs/shx3_defconfig
index 6bb413036892..cd6c519f8fad 100644
--- a/arch/sh/configs/shx3_defconfig
+++ b/arch/sh/configs/shx3_defconfig
@@ -13,7 +13,7 @@ CONFIG_CGROUP_FREEZER=y
13CONFIG_CGROUP_DEVICE=y 13CONFIG_CGROUP_DEVICE=y
14CONFIG_CGROUP_CPUACCT=y 14CONFIG_CGROUP_CPUACCT=y
15CONFIG_RESOURCE_COUNTERS=y 15CONFIG_RESOURCE_COUNTERS=y
16CONFIG_CGROUP_MEM_RES_CTLR=y 16CONFIG_CGROUP_MEMCG=y
17CONFIG_RELAY=y 17CONFIG_RELAY=y
18CONFIG_NAMESPACES=y 18CONFIG_NAMESPACES=y
19CONFIG_UTS_NS=y 19CONFIG_UTS_NS=y
diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig
index 8bfa4d056d7a..d7f89be9f474 100644
--- a/arch/sh/configs/urquell_defconfig
+++ b/arch/sh/configs/urquell_defconfig
@@ -15,8 +15,8 @@ CONFIG_CPUSETS=y
15# CONFIG_PROC_PID_CPUSET is not set 15# CONFIG_PROC_PID_CPUSET is not set
16CONFIG_CGROUP_CPUACCT=y 16CONFIG_CGROUP_CPUACCT=y
17CONFIG_RESOURCE_COUNTERS=y 17CONFIG_RESOURCE_COUNTERS=y
18CONFIG_CGROUP_MEM_RES_CTLR=y 18CONFIG_CGROUP_MEMCG=y
19CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 19CONFIG_CGROUP_MEMCG_SWAP=y
20CONFIG_CGROUP_SCHED=y 20CONFIG_CGROUP_SCHED=y
21CONFIG_RT_GROUP_SCHED=y 21CONFIG_RT_GROUP_SCHED=y
22CONFIG_BLK_DEV_INITRD=y 22CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/tile/configs/tilegx_defconfig b/arch/tile/configs/tilegx_defconfig
index b8d99aca5431..0270620a1692 100644
--- a/arch/tile/configs/tilegx_defconfig
+++ b/arch/tile/configs/tilegx_defconfig
@@ -18,8 +18,8 @@ CONFIG_CGROUP_DEVICE=y
18CONFIG_CPUSETS=y 18CONFIG_CPUSETS=y
19CONFIG_CGROUP_CPUACCT=y 19CONFIG_CGROUP_CPUACCT=y
20CONFIG_RESOURCE_COUNTERS=y 20CONFIG_RESOURCE_COUNTERS=y
21CONFIG_CGROUP_MEM_RES_CTLR=y 21CONFIG_CGROUP_MEMCG=y
22CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 22CONFIG_CGROUP_MEMCG_SWAP=y
23CONFIG_CGROUP_SCHED=y 23CONFIG_CGROUP_SCHED=y
24CONFIG_RT_GROUP_SCHED=y 24CONFIG_RT_GROUP_SCHED=y
25CONFIG_BLK_CGROUP=y 25CONFIG_BLK_CGROUP=y
diff --git a/arch/tile/configs/tilepro_defconfig b/arch/tile/configs/tilepro_defconfig
index 2b1fd31894f1..c11de27a9bcb 100644
--- a/arch/tile/configs/tilepro_defconfig
+++ b/arch/tile/configs/tilepro_defconfig
@@ -17,8 +17,8 @@ CONFIG_CGROUP_DEVICE=y
17CONFIG_CPUSETS=y 17CONFIG_CPUSETS=y
18CONFIG_CGROUP_CPUACCT=y 18CONFIG_CGROUP_CPUACCT=y
19CONFIG_RESOURCE_COUNTERS=y 19CONFIG_RESOURCE_COUNTERS=y
20CONFIG_CGROUP_MEM_RES_CTLR=y 20CONFIG_CGROUP_MEMCG=y
21CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 21CONFIG_CGROUP_MEMCG_SWAP=y
22CONFIG_CGROUP_SCHED=y 22CONFIG_CGROUP_SCHED=y
23CONFIG_RT_GROUP_SCHED=y 23CONFIG_RT_GROUP_SCHED=y
24CONFIG_BLK_CGROUP=y 24CONFIG_BLK_CGROUP=y
diff --git a/arch/um/defconfig b/arch/um/defconfig
index 7823ab12e6a4..fec0d5d27460 100644
--- a/arch/um/defconfig
+++ b/arch/um/defconfig
@@ -155,10 +155,10 @@ CONFIG_CPUSETS=y
155CONFIG_PROC_PID_CPUSET=y 155CONFIG_PROC_PID_CPUSET=y
156CONFIG_CGROUP_CPUACCT=y 156CONFIG_CGROUP_CPUACCT=y
157CONFIG_RESOURCE_COUNTERS=y 157CONFIG_RESOURCE_COUNTERS=y
158CONFIG_CGROUP_MEM_RES_CTLR=y 158CONFIG_CGROUP_MEMCG=y
159CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 159CONFIG_CGROUP_MEMCG_SWAP=y
160# CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set 160# CONFIG_CGROUP_MEMCG_SWAP_ENABLED is not set
161# CONFIG_CGROUP_MEM_RES_CTLR_KMEM is not set 161# CONFIG_CGROUP_MEMCG_KMEM is not set
162CONFIG_CGROUP_SCHED=y 162CONFIG_CGROUP_SCHED=y
163CONFIG_FAIR_GROUP_SCHED=y 163CONFIG_FAIR_GROUP_SCHED=y
164# CONFIG_CFS_BANDWIDTH is not set 164# CONFIG_CFS_BANDWIDTH is not set
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
index 5b41ce079024..dfae957398c3 100644
--- a/include/linux/cgroup_subsys.h
+++ b/include/linux/cgroup_subsys.h
@@ -31,7 +31,7 @@ SUBSYS(cpuacct)
31 31
32/* */ 32/* */
33 33
34#ifdef CONFIG_CGROUP_MEM_RES_CTLR 34#ifdef CONFIG_MEMCG
35SUBSYS(mem_cgroup) 35SUBSYS(mem_cgroup)
36#endif 36#endif
37 37
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 83e7ba90d6e5..170076222431 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -38,7 +38,7 @@ struct mem_cgroup_reclaim_cookie {
38 unsigned int generation; 38 unsigned int generation;
39}; 39};
40 40
41#ifdef CONFIG_CGROUP_MEM_RES_CTLR 41#ifdef CONFIG_MEMCG
42/* 42/*
43 * All "charge" functions with gfp_mask should use GFP_KERNEL or 43 * All "charge" functions with gfp_mask should use GFP_KERNEL or
44 * (gfp_mask & GFP_RECLAIM_MASK). In current implementatin, memcg doesn't 44 * (gfp_mask & GFP_RECLAIM_MASK). In current implementatin, memcg doesn't
@@ -124,7 +124,7 @@ extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
124extern void mem_cgroup_replace_page_cache(struct page *oldpage, 124extern void mem_cgroup_replace_page_cache(struct page *oldpage,
125 struct page *newpage); 125 struct page *newpage);
126 126
127#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 127#ifdef CONFIG_MEMCG_SWAP
128extern int do_swap_account; 128extern int do_swap_account;
129#endif 129#endif
130 130
@@ -193,7 +193,7 @@ void mem_cgroup_split_huge_fixup(struct page *head);
193bool mem_cgroup_bad_page_check(struct page *page); 193bool mem_cgroup_bad_page_check(struct page *page);
194void mem_cgroup_print_bad_page(struct page *page); 194void mem_cgroup_print_bad_page(struct page *page);
195#endif 195#endif
196#else /* CONFIG_CGROUP_MEM_RES_CTLR */ 196#else /* CONFIG_MEMCG */
197struct mem_cgroup; 197struct mem_cgroup;
198 198
199static inline int mem_cgroup_newpage_charge(struct page *page, 199static inline int mem_cgroup_newpage_charge(struct page *page,
@@ -384,9 +384,9 @@ static inline void mem_cgroup_replace_page_cache(struct page *oldpage,
384 struct page *newpage) 384 struct page *newpage)
385{ 385{
386} 386}
387#endif /* CONFIG_CGROUP_MEM_RES_CTLR */ 387#endif /* CONFIG_MEMCG */
388 388
389#if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) 389#if !defined(CONFIG_MEMCG) || !defined(CONFIG_DEBUG_VM)
390static inline bool 390static inline bool
391mem_cgroup_bad_page_check(struct page *page) 391mem_cgroup_bad_page_check(struct page *page)
392{ 392{
@@ -406,7 +406,7 @@ enum {
406}; 406};
407 407
408struct sock; 408struct sock;
409#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 409#ifdef CONFIG_MEMCG_KMEM
410void sock_update_memcg(struct sock *sk); 410void sock_update_memcg(struct sock *sk);
411void sock_release_memcg(struct sock *sk); 411void sock_release_memcg(struct sock *sk);
412#else 412#else
@@ -416,6 +416,6 @@ static inline void sock_update_memcg(struct sock *sk)
416static inline void sock_release_memcg(struct sock *sk) 416static inline void sock_release_memcg(struct sock *sk)
417{ 417{
418} 418}
419#endif /* CONFIG_CGROUP_MEM_RES_CTLR_KMEM */ 419#endif /* CONFIG_MEMCG_KMEM */
420#endif /* _LINUX_MEMCONTROL_H */ 420#endif /* _LINUX_MEMCONTROL_H */
421 421
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 458988bd55a1..3bdfa15b2012 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -201,7 +201,7 @@ struct zone_reclaim_stat {
201struct lruvec { 201struct lruvec {
202 struct list_head lists[NR_LRU_LISTS]; 202 struct list_head lists[NR_LRU_LISTS];
203 struct zone_reclaim_stat reclaim_stat; 203 struct zone_reclaim_stat reclaim_stat;
204#ifdef CONFIG_CGROUP_MEM_RES_CTLR 204#ifdef CONFIG_MEMCG
205 struct zone *zone; 205 struct zone *zone;
206#endif 206#endif
207}; 207};
@@ -671,7 +671,7 @@ typedef struct pglist_data {
671 int nr_zones; 671 int nr_zones;
672#ifdef CONFIG_FLAT_NODE_MEM_MAP /* means !SPARSEMEM */ 672#ifdef CONFIG_FLAT_NODE_MEM_MAP /* means !SPARSEMEM */
673 struct page *node_mem_map; 673 struct page *node_mem_map;
674#ifdef CONFIG_CGROUP_MEM_RES_CTLR 674#ifdef CONFIG_MEMCG
675 struct page_cgroup *node_page_cgroup; 675 struct page_cgroup *node_page_cgroup;
676#endif 676#endif
677#endif 677#endif
@@ -736,7 +736,7 @@ extern void lruvec_init(struct lruvec *lruvec, struct zone *zone);
736 736
737static inline struct zone *lruvec_zone(struct lruvec *lruvec) 737static inline struct zone *lruvec_zone(struct lruvec *lruvec)
738{ 738{
739#ifdef CONFIG_CGROUP_MEM_RES_CTLR 739#ifdef CONFIG_MEMCG
740 return lruvec->zone; 740 return lruvec->zone;
741#else 741#else
742 return container_of(lruvec, struct zone, lruvec); 742 return container_of(lruvec, struct zone, lruvec);
@@ -1052,7 +1052,7 @@ struct mem_section {
1052 1052
1053 /* See declaration of similar field in struct zone */ 1053 /* See declaration of similar field in struct zone */
1054 unsigned long *pageblock_flags; 1054 unsigned long *pageblock_flags;
1055#ifdef CONFIG_CGROUP_MEM_RES_CTLR 1055#ifdef CONFIG_MEMCG
1056 /* 1056 /*
1057 * If !SPARSEMEM, pgdat doesn't have page_cgroup pointer. We use 1057 * If !SPARSEMEM, pgdat doesn't have page_cgroup pointer. We use
1058 * section. (see memcontrol.h/page_cgroup.h about this.) 1058 * section. (see memcontrol.h/page_cgroup.h about this.)
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index a88cdba27809..777a524716db 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -12,7 +12,7 @@ enum {
12#ifndef __GENERATING_BOUNDS_H 12#ifndef __GENERATING_BOUNDS_H
13#include <generated/bounds.h> 13#include <generated/bounds.h>
14 14
15#ifdef CONFIG_CGROUP_MEM_RES_CTLR 15#ifdef CONFIG_MEMCG
16#include <linux/bit_spinlock.h> 16#include <linux/bit_spinlock.h>
17 17
18/* 18/*
@@ -82,7 +82,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc)
82 bit_spin_unlock(PCG_LOCK, &pc->flags); 82 bit_spin_unlock(PCG_LOCK, &pc->flags);
83} 83}
84 84
85#else /* CONFIG_CGROUP_MEM_RES_CTLR */ 85#else /* CONFIG_MEMCG */
86struct page_cgroup; 86struct page_cgroup;
87 87
88static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) 88static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
@@ -102,11 +102,11 @@ static inline void __init page_cgroup_init_flatmem(void)
102{ 102{
103} 103}
104 104
105#endif /* CONFIG_CGROUP_MEM_RES_CTLR */ 105#endif /* CONFIG_MEMCG */
106 106
107#include <linux/swap.h> 107#include <linux/swap.h>
108 108
109#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 109#ifdef CONFIG_MEMCG_SWAP
110extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, 110extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
111 unsigned short old, unsigned short new); 111 unsigned short old, unsigned short new);
112extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); 112extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id);
@@ -138,7 +138,7 @@ static inline void swap_cgroup_swapoff(int type)
138 return; 138 return;
139} 139}
140 140
141#endif /* CONFIG_CGROUP_MEM_RES_CTLR_SWAP */ 141#endif /* CONFIG_MEMCG_SWAP */
142 142
143#endif /* !__GENERATING_BOUNDS_H */ 143#endif /* !__GENERATING_BOUNDS_H */
144 144
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 68dcffaa62a0..865725adb9d3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1584,7 +1584,7 @@ struct task_struct {
1584 /* bitmask and counter of trace recursion */ 1584 /* bitmask and counter of trace recursion */
1585 unsigned long trace_recursion; 1585 unsigned long trace_recursion;
1586#endif /* CONFIG_TRACING */ 1586#endif /* CONFIG_TRACING */
1587#ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ 1587#ifdef CONFIG_MEMCG /* memcg uses this to do batch job */
1588 struct memcg_batch_info { 1588 struct memcg_batch_info {
1589 int do_batch; /* incremented when batch uncharge started */ 1589 int do_batch; /* incremented when batch uncharge started */
1590 struct mem_cgroup *memcg; /* target memcg of uncharge */ 1590 struct mem_cgroup *memcg; /* target memcg of uncharge */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c84ec68eaec9..9a16bb1cefd1 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -301,7 +301,7 @@ static inline void scan_unevictable_unregister_node(struct node *node)
301 301
302extern int kswapd_run(int nid); 302extern int kswapd_run(int nid);
303extern void kswapd_stop(int nid); 303extern void kswapd_stop(int nid);
304#ifdef CONFIG_CGROUP_MEM_RES_CTLR 304#ifdef CONFIG_MEMCG
305extern int mem_cgroup_swappiness(struct mem_cgroup *mem); 305extern int mem_cgroup_swappiness(struct mem_cgroup *mem);
306#else 306#else
307static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) 307static inline int mem_cgroup_swappiness(struct mem_cgroup *mem)
@@ -309,7 +309,7 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem)
309 return vm_swappiness; 309 return vm_swappiness;
310} 310}
311#endif 311#endif
312#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 312#ifdef CONFIG_MEMCG_SWAP
313extern void mem_cgroup_uncharge_swap(swp_entry_t ent); 313extern void mem_cgroup_uncharge_swap(swp_entry_t ent);
314#else 314#else
315static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) 315static inline void mem_cgroup_uncharge_swap(swp_entry_t ent)
@@ -360,7 +360,7 @@ extern int reuse_swap_page(struct page *);
360extern int try_to_free_swap(struct page *); 360extern int try_to_free_swap(struct page *);
361struct backing_dev_info; 361struct backing_dev_info;
362 362
363#ifdef CONFIG_CGROUP_MEM_RES_CTLR 363#ifdef CONFIG_MEMCG
364extern void 364extern void
365mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); 365mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout);
366#else 366#else
diff --git a/include/net/sock.h b/include/net/sock.h
index e067f8c18f88..cee528c119ca 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -913,7 +913,7 @@ struct proto {
913#ifdef SOCK_REFCNT_DEBUG 913#ifdef SOCK_REFCNT_DEBUG
914 atomic_t socks; 914 atomic_t socks;
915#endif 915#endif
916#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 916#ifdef CONFIG_MEMCG_KMEM
917 /* 917 /*
918 * cgroup specific init/deinit functions. Called once for all 918 * cgroup specific init/deinit functions. Called once for all
919 * protocols that implement it, from cgroups populate function. 919 * protocols that implement it, from cgroups populate function.
@@ -994,7 +994,7 @@ inline void sk_refcnt_debug_release(const struct sock *sk)
994#define sk_refcnt_debug_release(sk) do { } while (0) 994#define sk_refcnt_debug_release(sk) do { } while (0)
995#endif /* SOCK_REFCNT_DEBUG */ 995#endif /* SOCK_REFCNT_DEBUG */
996 996
997#if defined(CONFIG_CGROUP_MEM_RES_CTLR_KMEM) && defined(CONFIG_NET) 997#if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_NET)
998extern struct static_key memcg_socket_limit_enabled; 998extern struct static_key memcg_socket_limit_enabled;
999static inline struct cg_proto *parent_cg_proto(struct proto *proto, 999static inline struct cg_proto *parent_cg_proto(struct proto *proto,
1000 struct cg_proto *cg_proto) 1000 struct cg_proto *cg_proto)
diff --git a/init/Kconfig b/init/Kconfig
index 72437760e90e..af6c7f8ba019 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -686,7 +686,7 @@ config RESOURCE_COUNTERS
686 This option enables controller independent resource accounting 686 This option enables controller independent resource accounting
687 infrastructure that works with cgroups. 687 infrastructure that works with cgroups.
688 688
689config CGROUP_MEM_RES_CTLR 689config MEMCG
690 bool "Memory Resource Controller for Control Groups" 690 bool "Memory Resource Controller for Control Groups"
691 depends on RESOURCE_COUNTERS 691 depends on RESOURCE_COUNTERS
692 select MM_OWNER 692 select MM_OWNER
@@ -709,9 +709,9 @@ config CGROUP_MEM_RES_CTLR
709 This config option also selects MM_OWNER config option, which 709 This config option also selects MM_OWNER config option, which
710 could in turn add some fork/exit overhead. 710 could in turn add some fork/exit overhead.
711 711
712config CGROUP_MEM_RES_CTLR_SWAP 712config MEMCG_SWAP
713 bool "Memory Resource Controller Swap Extension" 713 bool "Memory Resource Controller Swap Extension"
714 depends on CGROUP_MEM_RES_CTLR && SWAP 714 depends on MEMCG && SWAP
715 help 715 help
716 Add swap management feature to memory resource controller. When you 716 Add swap management feature to memory resource controller. When you
717 enable this, you can limit mem+swap usage per cgroup. In other words, 717 enable this, you can limit mem+swap usage per cgroup. In other words,
@@ -726,9 +726,9 @@ config CGROUP_MEM_RES_CTLR_SWAP
726 if boot option "swapaccount=0" is set, swap will not be accounted. 726 if boot option "swapaccount=0" is set, swap will not be accounted.
727 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page 727 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
728 size is 4096bytes, 512k per 1Gbytes of swap. 728 size is 4096bytes, 512k per 1Gbytes of swap.
729config CGROUP_MEM_RES_CTLR_SWAP_ENABLED 729config MEMCG_SWAP_ENABLED
730 bool "Memory Resource Controller Swap Extension enabled by default" 730 bool "Memory Resource Controller Swap Extension enabled by default"
731 depends on CGROUP_MEM_RES_CTLR_SWAP 731 depends on MEMCG_SWAP
732 default y 732 default y
733 help 733 help
734 Memory Resource Controller Swap Extension comes with its price in 734 Memory Resource Controller Swap Extension comes with its price in
@@ -739,9 +739,9 @@ config CGROUP_MEM_RES_CTLR_SWAP_ENABLED
739 For those who want to have the feature enabled by default should 739 For those who want to have the feature enabled by default should
740 select this option (if, for some reason, they need to disable it 740 select this option (if, for some reason, they need to disable it
741 then swapaccount=0 does the trick). 741 then swapaccount=0 does the trick).
742config CGROUP_MEM_RES_CTLR_KMEM 742config MEMCG_KMEM
743 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)" 743 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
744 depends on CGROUP_MEM_RES_CTLR && EXPERIMENTAL 744 depends on MEMCG && EXPERIMENTAL
745 default n 745 default n
746 help 746 help
747 The Kernel Memory extension for Memory Resource Controller can limit 747 The Kernel Memory extension for Memory Resource Controller can limit
diff --git a/kernel/fork.c b/kernel/fork.c
index aaa8813c45d1..3bd2280d79f6 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1306,7 +1306,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1306#ifdef CONFIG_DEBUG_MUTEXES 1306#ifdef CONFIG_DEBUG_MUTEXES
1307 p->blocked_on = NULL; /* not blocked yet */ 1307 p->blocked_on = NULL; /* not blocked yet */
1308#endif 1308#endif
1309#ifdef CONFIG_CGROUP_MEM_RES_CTLR 1309#ifdef CONFIG_MEMCG
1310 p->memcg_batch.do_batch = 0; 1310 p->memcg_batch.do_batch = 0;
1311 p->memcg_batch.memcg = NULL; 1311 p->memcg_batch.memcg = NULL;
1312#endif 1312#endif
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,
diff --git a/net/core/sock.c b/net/core/sock.c
index 2676a88f533e..a67b06280e4c 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -142,7 +142,7 @@
142static DEFINE_MUTEX(proto_list_mutex); 142static DEFINE_MUTEX(proto_list_mutex);
143static LIST_HEAD(proto_list); 143static LIST_HEAD(proto_list);
144 144
145#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 145#ifdef CONFIG_MEMCG_KMEM
146int mem_cgroup_sockets_init(struct mem_cgroup *memcg, struct cgroup_subsys *ss) 146int mem_cgroup_sockets_init(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
147{ 147{
148 struct proto *proto; 148 struct proto *proto;
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index ae2ccf2890e4..15ca63ec604e 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -49,7 +49,7 @@ obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
49obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o 49obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
50obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o 50obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
51obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o 51obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
52obj-$(CONFIG_CGROUP_MEM_RES_CTLR_KMEM) += tcp_memcontrol.o 52obj-$(CONFIG_MEMCG_KMEM) += tcp_memcontrol.o
53obj-$(CONFIG_NETLABEL) += cipso_ipv4.o 53obj-$(CONFIG_NETLABEL) += cipso_ipv4.o
54 54
55obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ 55obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 5840c3255721..ed7db3f1b6f2 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -184,7 +184,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
184 int ret; 184 int ret;
185 unsigned long vec[3]; 185 unsigned long vec[3];
186 struct net *net = current->nsproxy->net_ns; 186 struct net *net = current->nsproxy->net_ns;
187#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 187#ifdef CONFIG_MEMCG_KMEM
188 struct mem_cgroup *memcg; 188 struct mem_cgroup *memcg;
189#endif 189#endif
190 190
@@ -203,7 +203,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
203 if (ret) 203 if (ret)
204 return ret; 204 return ret;
205 205
206#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 206#ifdef CONFIG_MEMCG_KMEM
207 rcu_read_lock(); 207 rcu_read_lock();
208 memcg = mem_cgroup_from_task(current); 208 memcg = mem_cgroup_from_task(current);
209 209
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 2fbd9921253f..4bc8f6769b57 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2633,7 +2633,7 @@ struct proto tcp_prot = {
2633 .compat_setsockopt = compat_tcp_setsockopt, 2633 .compat_setsockopt = compat_tcp_setsockopt,
2634 .compat_getsockopt = compat_tcp_getsockopt, 2634 .compat_getsockopt = compat_tcp_getsockopt,
2635#endif 2635#endif
2636#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 2636#ifdef CONFIG_MEMCG_KMEM
2637 .init_cgroup = tcp_init_cgroup, 2637 .init_cgroup = tcp_init_cgroup,
2638 .destroy_cgroup = tcp_destroy_cgroup, 2638 .destroy_cgroup = tcp_destroy_cgroup,
2639 .proto_cgroup = tcp_proto_cgroup, 2639 .proto_cgroup = tcp_proto_cgroup,
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 221224e72507..61c7b6d83176 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -2015,7 +2015,7 @@ struct proto tcpv6_prot = {
2015 .compat_setsockopt = compat_tcp_setsockopt, 2015 .compat_setsockopt = compat_tcp_setsockopt,
2016 .compat_getsockopt = compat_tcp_getsockopt, 2016 .compat_getsockopt = compat_tcp_getsockopt,
2017#endif 2017#endif
2018#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM 2018#ifdef CONFIG_MEMCG_KMEM
2019 .proto_cgroup = tcp_proto_cgroup, 2019 .proto_cgroup = tcp_proto_cgroup,
2020#endif 2020#endif
2021}; 2021};