diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2012-07-31 19:43:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:43 -0400 |
commit | c255a458055e459f65eb7b7f51dc5dbdd0caf1d8 (patch) | |
tree | b143b1914eeb6f27f53e30f9f0275d0f1ca5480b | |
parent | 80934513b230bfcf70265f2ef0fdae89fb391633 (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>
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). | |||
187 | But see section 8.2: when moving a task to another cgroup, its pages may | 187 | But see section 8.2: when moving a task to another cgroup, its pages may |
188 | be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. | 188 | be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. |
189 | 189 | ||
190 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. | 190 | Exception: If CONFIG_CGROUP_CGROUP_MEMCG_SWAP is not used. |
191 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to | 191 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to |
192 | be backed into memory in force, charges for pages are accounted against the | 192 | be backed into memory in force, charges for pages are accounted against the |
193 | caller of swapoff rather than the users of shmem. | 193 | caller of swapoff rather than the users of shmem. |
194 | 194 | ||
195 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) | 195 | 2.4 Swap Extension (CONFIG_MEMCG_SWAP) |
196 | 196 | ||
197 | Swap Extension allows you to record charge for swap. A swapped-in page is | 197 | Swap Extension allows you to record charge for swap. A swapped-in page is |
198 | charged back to original page allocator if possible. | 198 | charged 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 | ||
262 | 2.7 Kernel Memory Extension (CONFIG_CGROUP_MEM_RES_CTLR_KMEM) | 262 | 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) |
263 | 263 | ||
264 | With the Kernel memory extension, the Memory Controller is able to limit | 264 | With the Kernel memory extension, the Memory Controller is able to limit |
265 | the amount of kernel memory used by the system. Kernel memory is fundamentally | 265 | the amount of kernel memory used by the system. Kernel memory is fundamentally |
@@ -286,8 +286,8 @@ per cgroup, instead of globally. | |||
286 | 286 | ||
287 | a. Enable CONFIG_CGROUPS | 287 | a. Enable CONFIG_CGROUPS |
288 | b. Enable CONFIG_RESOURCE_COUNTERS | 288 | b. Enable CONFIG_RESOURCE_COUNTERS |
289 | c. Enable CONFIG_CGROUP_MEM_RES_CTLR | 289 | c. Enable CONFIG_MEMCG |
290 | d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension) | 290 | d. Enable CONFIG_MEMCG_SWAP (to use swap extension) |
291 | 291 | ||
292 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) | 292 | 1. 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 | |||
21 | CONFIG_CPUSETS=y | 21 | CONFIG_CPUSETS=y |
22 | CONFIG_CGROUP_CPUACCT=y | 22 | CONFIG_CGROUP_CPUACCT=y |
23 | CONFIG_RESOURCE_COUNTERS=y | 23 | CONFIG_RESOURCE_COUNTERS=y |
24 | CONFIG_CGROUP_MEM_RES_CTLR=y | 24 | CONFIG_CGROUP_MEMCG=y |
25 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | 25 | CONFIG_CGROUP_MEMCG_SWAP=y |
26 | CONFIG_NAMESPACES=y | 26 | CONFIG_NAMESPACES=y |
27 | CONFIG_RELAY=y | 27 | CONFIG_RELAY=y |
28 | CONFIG_BLK_DEV_INITRD=y | 28 | CONFIG_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 | |||
13 | CONFIG_CPUSETS=y | 13 | CONFIG_CPUSETS=y |
14 | CONFIG_CGROUP_CPUACCT=y | 14 | CONFIG_CGROUP_CPUACCT=y |
15 | CONFIG_RESOURCE_COUNTERS=y | 15 | CONFIG_RESOURCE_COUNTERS=y |
16 | CONFIG_CGROUP_MEM_RES_CTLR=y | 16 | CONFIG_CGROUP_MEMCG=y |
17 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | 17 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y |
18 | CONFIG_CGROUP_SCHED=y | 18 | CONFIG_CGROUP_SCHED=y |
19 | CONFIG_RT_GROUP_SCHED=y | 19 | CONFIG_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 | |||
11 | CONFIG_CGROUP_DEVICE=y | 11 | CONFIG_CGROUP_DEVICE=y |
12 | CONFIG_CGROUP_CPUACCT=y | 12 | CONFIG_CGROUP_CPUACCT=y |
13 | CONFIG_RESOURCE_COUNTERS=y | 13 | CONFIG_RESOURCE_COUNTERS=y |
14 | CONFIG_CGROUP_MEM_RES_CTLR=y | 14 | CONFIG_CGROUP_MEMCG=y |
15 | CONFIG_BLK_CGROUP=y | 15 | CONFIG_BLK_CGROUP=y |
16 | CONFIG_NAMESPACES=y | 16 | CONFIG_NAMESPACES=y |
17 | CONFIG_BLK_DEV_INITRD=y | 17 | CONFIG_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 |
19 | CONFIG_CGROUP_CPUACCT=y | 19 | CONFIG_CGROUP_CPUACCT=y |
20 | CONFIG_RESOURCE_COUNTERS=y | 20 | CONFIG_RESOURCE_COUNTERS=y |
21 | CONFIG_CGROUP_MEM_RES_CTLR=y | 21 | CONFIG_CGROUP_MEMCG=y |
22 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | 22 | CONFIG_CGROUP_MEMCG_SWAP=y |
23 | CONFIG_CGROUP_SCHED=y | 23 | CONFIG_CGROUP_SCHED=y |
24 | CONFIG_RT_GROUP_SCHED=y | 24 | CONFIG_RT_GROUP_SCHED=y |
25 | CONFIG_BLK_CGROUP=y | 25 | CONFIG_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 | |||
11 | CONFIG_CGROUP_DEVICE=y | 11 | CONFIG_CGROUP_DEVICE=y |
12 | CONFIG_CGROUP_CPUACCT=y | 12 | CONFIG_CGROUP_CPUACCT=y |
13 | CONFIG_RESOURCE_COUNTERS=y | 13 | CONFIG_RESOURCE_COUNTERS=y |
14 | CONFIG_CGROUP_MEM_RES_CTLR=y | 14 | CONFIG_CGROUP_MEMCG=y |
15 | CONFIG_RELAY=y | 15 | CONFIG_RELAY=y |
16 | CONFIG_NAMESPACES=y | 16 | CONFIG_NAMESPACES=y |
17 | CONFIG_UTS_NS=y | 17 | CONFIG_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 | |||
13 | CONFIG_CGROUP_DEVICE=y | 13 | CONFIG_CGROUP_DEVICE=y |
14 | CONFIG_CGROUP_CPUACCT=y | 14 | CONFIG_CGROUP_CPUACCT=y |
15 | CONFIG_RESOURCE_COUNTERS=y | 15 | CONFIG_RESOURCE_COUNTERS=y |
16 | CONFIG_CGROUP_MEM_RES_CTLR=y | 16 | CONFIG_CGROUP_MEMCG=y |
17 | CONFIG_RELAY=y | 17 | CONFIG_RELAY=y |
18 | CONFIG_NAMESPACES=y | 18 | CONFIG_NAMESPACES=y |
19 | CONFIG_UTS_NS=y | 19 | CONFIG_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 |
16 | CONFIG_CGROUP_CPUACCT=y | 16 | CONFIG_CGROUP_CPUACCT=y |
17 | CONFIG_RESOURCE_COUNTERS=y | 17 | CONFIG_RESOURCE_COUNTERS=y |
18 | CONFIG_CGROUP_MEM_RES_CTLR=y | 18 | CONFIG_CGROUP_MEMCG=y |
19 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | 19 | CONFIG_CGROUP_MEMCG_SWAP=y |
20 | CONFIG_CGROUP_SCHED=y | 20 | CONFIG_CGROUP_SCHED=y |
21 | CONFIG_RT_GROUP_SCHED=y | 21 | CONFIG_RT_GROUP_SCHED=y |
22 | CONFIG_BLK_DEV_INITRD=y | 22 | CONFIG_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 | |||
18 | CONFIG_CPUSETS=y | 18 | CONFIG_CPUSETS=y |
19 | CONFIG_CGROUP_CPUACCT=y | 19 | CONFIG_CGROUP_CPUACCT=y |
20 | CONFIG_RESOURCE_COUNTERS=y | 20 | CONFIG_RESOURCE_COUNTERS=y |
21 | CONFIG_CGROUP_MEM_RES_CTLR=y | 21 | CONFIG_CGROUP_MEMCG=y |
22 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | 22 | CONFIG_CGROUP_MEMCG_SWAP=y |
23 | CONFIG_CGROUP_SCHED=y | 23 | CONFIG_CGROUP_SCHED=y |
24 | CONFIG_RT_GROUP_SCHED=y | 24 | CONFIG_RT_GROUP_SCHED=y |
25 | CONFIG_BLK_CGROUP=y | 25 | CONFIG_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 | |||
17 | CONFIG_CPUSETS=y | 17 | CONFIG_CPUSETS=y |
18 | CONFIG_CGROUP_CPUACCT=y | 18 | CONFIG_CGROUP_CPUACCT=y |
19 | CONFIG_RESOURCE_COUNTERS=y | 19 | CONFIG_RESOURCE_COUNTERS=y |
20 | CONFIG_CGROUP_MEM_RES_CTLR=y | 20 | CONFIG_CGROUP_MEMCG=y |
21 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | 21 | CONFIG_CGROUP_MEMCG_SWAP=y |
22 | CONFIG_CGROUP_SCHED=y | 22 | CONFIG_CGROUP_SCHED=y |
23 | CONFIG_RT_GROUP_SCHED=y | 23 | CONFIG_RT_GROUP_SCHED=y |
24 | CONFIG_BLK_CGROUP=y | 24 | CONFIG_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 | |||
155 | CONFIG_PROC_PID_CPUSET=y | 155 | CONFIG_PROC_PID_CPUSET=y |
156 | CONFIG_CGROUP_CPUACCT=y | 156 | CONFIG_CGROUP_CPUACCT=y |
157 | CONFIG_RESOURCE_COUNTERS=y | 157 | CONFIG_RESOURCE_COUNTERS=y |
158 | CONFIG_CGROUP_MEM_RES_CTLR=y | 158 | CONFIG_CGROUP_MEMCG=y |
159 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | 159 | CONFIG_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 |
162 | CONFIG_CGROUP_SCHED=y | 162 | CONFIG_CGROUP_SCHED=y |
163 | CONFIG_FAIR_GROUP_SCHED=y | 163 | CONFIG_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 |
35 | SUBSYS(mem_cgroup) | 35 | SUBSYS(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, | |||
124 | extern void mem_cgroup_replace_page_cache(struct page *oldpage, | 124 | extern 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 |
128 | extern int do_swap_account; | 128 | extern int do_swap_account; |
129 | #endif | 129 | #endif |
130 | 130 | ||
@@ -193,7 +193,7 @@ void mem_cgroup_split_huge_fixup(struct page *head); | |||
193 | bool mem_cgroup_bad_page_check(struct page *page); | 193 | bool mem_cgroup_bad_page_check(struct page *page); |
194 | void mem_cgroup_print_bad_page(struct page *page); | 194 | void mem_cgroup_print_bad_page(struct page *page); |
195 | #endif | 195 | #endif |
196 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 196 | #else /* CONFIG_MEMCG */ |
197 | struct mem_cgroup; | 197 | struct mem_cgroup; |
198 | 198 | ||
199 | static inline int mem_cgroup_newpage_charge(struct page *page, | 199 | static 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) |
390 | static inline bool | 390 | static inline bool |
391 | mem_cgroup_bad_page_check(struct page *page) | 391 | mem_cgroup_bad_page_check(struct page *page) |
392 | { | 392 | { |
@@ -406,7 +406,7 @@ enum { | |||
406 | }; | 406 | }; |
407 | 407 | ||
408 | struct sock; | 408 | struct sock; |
409 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM | 409 | #ifdef CONFIG_MEMCG_KMEM |
410 | void sock_update_memcg(struct sock *sk); | 410 | void sock_update_memcg(struct sock *sk); |
411 | void sock_release_memcg(struct sock *sk); | 411 | void sock_release_memcg(struct sock *sk); |
412 | #else | 412 | #else |
@@ -416,6 +416,6 @@ static inline void sock_update_memcg(struct sock *sk) | |||
416 | static inline void sock_release_memcg(struct sock *sk) | 416 | static 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 { | |||
201 | struct lruvec { | 201 | struct 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 | ||
737 | static inline struct zone *lruvec_zone(struct lruvec *lruvec) | 737 | static 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 */ |
86 | struct page_cgroup; | 86 | struct page_cgroup; |
87 | 87 | ||
88 | static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) | 88 | static 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 |
110 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | 110 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, |
111 | unsigned short old, unsigned short new); | 111 | unsigned short old, unsigned short new); |
112 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); | 112 | extern 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 | ||
302 | extern int kswapd_run(int nid); | 302 | extern int kswapd_run(int nid); |
303 | extern void kswapd_stop(int nid); | 303 | extern void kswapd_stop(int nid); |
304 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 304 | #ifdef CONFIG_MEMCG |
305 | extern int mem_cgroup_swappiness(struct mem_cgroup *mem); | 305 | extern int mem_cgroup_swappiness(struct mem_cgroup *mem); |
306 | #else | 306 | #else |
307 | static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | 307 | static 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 |
313 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | 313 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); |
314 | #else | 314 | #else |
315 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | 315 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) |
@@ -360,7 +360,7 @@ extern int reuse_swap_page(struct page *); | |||
360 | extern int try_to_free_swap(struct page *); | 360 | extern int try_to_free_swap(struct page *); |
361 | struct backing_dev_info; | 361 | struct backing_dev_info; |
362 | 362 | ||
363 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 363 | #ifdef CONFIG_MEMCG |
364 | extern void | 364 | extern void |
365 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 365 | mem_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) |
998 | extern struct static_key memcg_socket_limit_enabled; | 998 | extern struct static_key memcg_socket_limit_enabled; |
999 | static inline struct cg_proto *parent_cg_proto(struct proto *proto, | 999 | static 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 | ||
689 | config CGROUP_MEM_RES_CTLR | 689 | config 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 | ||
712 | config CGROUP_MEM_RES_CTLR_SWAP | 712 | config 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. |
729 | config CGROUP_MEM_RES_CTLR_SWAP_ENABLED | 729 | config 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). |
742 | config CGROUP_MEM_RES_CTLR_KMEM | 742 | config 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 | |||
49 | obj-$(CONFIG_MIGRATION) += migrate.o | 49 | obj-$(CONFIG_MIGRATION) += migrate.o |
50 | obj-$(CONFIG_QUICKLIST) += quicklist.o | 50 | obj-$(CONFIG_QUICKLIST) += quicklist.o |
51 | obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o | 51 | obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o |
52 | obj-$(CONFIG_CGROUP_MEM_RES_CTLR) += memcontrol.o page_cgroup.o | 52 | obj-$(CONFIG_MEMCG) += memcontrol.o page_cgroup.o |
53 | obj-$(CONFIG_CGROUP_HUGETLB) += hugetlb_cgroup.o | 53 | obj-$(CONFIG_CGROUP_HUGETLB) += hugetlb_cgroup.o |
54 | obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o | 54 | obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o |
55 | obj-$(CONFIG_HWPOISON_INJECT) += hwpoison-inject.o | 55 | obj-$(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 |
62 | static struct mem_cgroup *root_mem_cgroup __read_mostly; | 62 | static 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 */ |
66 | int do_swap_account __read_mostly; | 66 | int 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 |
70 | static int really_do_swap_account __initdata = 1; | 70 | static int really_do_swap_account __initdata = 1; |
71 | #else | 71 | #else |
72 | static int really_do_swap_account __initdata = 0; | 72 | static int really_do_swap_account __initdata = 0; |
@@ -407,7 +407,7 @@ static void mem_cgroup_get(struct mem_cgroup *memcg); | |||
407 | static void mem_cgroup_put(struct mem_cgroup *memcg); | 407 | static 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 | } |
467 | EXPORT_SYMBOL(tcp_proto_cgroup); | 467 | EXPORT_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) |
472 | static void disarm_sock_keys(struct mem_cgroup *memcg) | 472 | static 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 |
4522 | static int memcg_init_kmem(struct mem_cgroup *memcg, struct cgroup_subsys *ss) | 4522 | static 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 | } |
4796 | EXPORT_SYMBOL(parent_mem_cgroup); | 4796 | EXPORT_SYMBOL(parent_mem_cgroup); |
4797 | 4797 | ||
4798 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 4798 | #ifdef CONFIG_MEMCG_SWAP |
4799 | static void __init enable_swap_cgroup(void) | 4799 | static 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 |
5530 | static int __init enable_swap_account(char *s) | 5530 | static 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 |
132 | u64 hwpoison_filter_memcg; | 132 | u64 hwpoison_filter_memcg; |
133 | EXPORT_SYMBOL_GPL(hwpoison_filter_memcg); | 133 | EXPORT_SYMBOL_GPL(hwpoison_filter_memcg); |
134 | static int hwpoison_filter_task(struct page *p) | 134 | static 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 |
545 | void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, | 545 | void 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 | ||
322 | static DEFINE_MUTEX(swap_cgroup_mutex); | 322 | static DEFINE_MUTEX(swap_cgroup_mutex); |
323 | struct swap_cgroup_ctrl { | 323 | struct 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 */ | |||
133 | static LIST_HEAD(shrinker_list); | 133 | static LIST_HEAD(shrinker_list); |
134 | static DECLARE_RWSEM(shrinker_rwsem); | 134 | static DECLARE_RWSEM(shrinker_rwsem); |
135 | 135 | ||
136 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 136 | #ifdef CONFIG_MEMCG |
137 | static bool global_reclaim(struct scan_control *sc) | 137 | static 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 | ||
2147 | unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *memcg, | 2147 | unsigned 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 @@ | |||
142 | static DEFINE_MUTEX(proto_list_mutex); | 142 | static DEFINE_MUTEX(proto_list_mutex); |
143 | static LIST_HEAD(proto_list); | 143 | static LIST_HEAD(proto_list); |
144 | 144 | ||
145 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM | 145 | #ifdef CONFIG_MEMCG_KMEM |
146 | int mem_cgroup_sockets_init(struct mem_cgroup *memcg, struct cgroup_subsys *ss) | 146 | int 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 | |||
49 | obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o | 49 | obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o |
50 | obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o | 50 | obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o |
51 | obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o | 51 | obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o |
52 | obj-$(CONFIG_CGROUP_MEM_RES_CTLR_KMEM) += tcp_memcontrol.o | 52 | obj-$(CONFIG_MEMCG_KMEM) += tcp_memcontrol.o |
53 | obj-$(CONFIG_NETLABEL) += cipso_ipv4.o | 53 | obj-$(CONFIG_NETLABEL) += cipso_ipv4.o |
54 | 54 | ||
55 | obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ | 55 | obj-$(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 | }; |