aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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
7 files changed, 23 insertions, 23 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
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)