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 /include/linux | |
| 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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cgroup_subsys.h | 2 | ||||
| -rw-r--r-- | include/linux/memcontrol.h | 14 | ||||
| -rw-r--r-- | include/linux/mmzone.h | 8 | ||||
| -rw-r--r-- | include/linux/page_cgroup.h | 10 | ||||
| -rw-r--r-- | include/linux/sched.h | 2 | ||||
| -rw-r--r-- | include/linux/swap.h | 6 |
6 files changed, 21 insertions, 21 deletions
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 |
