|
@@ -61,12 +61,12 @@ struct cgroup_subsys mem_cgroup_subsys __read_mostly;
|
|
|
#define MEM_CGROUP_RECLAIM_RETRIES 5
|
|
|
static struct mem_cgroup *root_mem_cgroup __read_mostly;
|
|
|
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
|
|
|
+#ifdef CONFIG_MEMCG_SWAP
|
|
|
/* Turned on only when memory cgroup is enabled && really_do_swap_account = 1 */
|
|
|
int do_swap_account __read_mostly;
|
|
|
|
|
|
/* for remember boot option*/
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED
|
|
|
+#ifdef CONFIG_MEMCG_SWAP_ENABLED
|
|
|
static int really_do_swap_account __initdata = 1;
|
|
|
#else
|
|
|
static int really_do_swap_account __initdata = 0;
|
|
@@ -407,7 +407,7 @@ static void mem_cgroup_get(struct mem_cgroup *memcg);
|
|
|
static void mem_cgroup_put(struct mem_cgroup *memcg);
|
|
|
|
|
|
/* Writing them here to avoid exposing memcg's inner layout */
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
|
|
|
+#ifdef CONFIG_MEMCG_KMEM
|
|
|
#include <net/sock.h>
|
|
|
#include <net/ip.h>
|
|
|
|
|
@@ -466,9 +466,9 @@ struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg)
|
|
|
}
|
|
|
EXPORT_SYMBOL(tcp_proto_cgroup);
|
|
|
#endif /* CONFIG_INET */
|
|
|
-#endif /* CONFIG_CGROUP_MEM_RES_CTLR_KMEM */
|
|
|
+#endif /* CONFIG_MEMCG_KMEM */
|
|
|
|
|
|
-#if defined(CONFIG_INET) && defined(CONFIG_CGROUP_MEM_RES_CTLR_KMEM)
|
|
|
+#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)
|
|
|
static void disarm_sock_keys(struct mem_cgroup *memcg)
|
|
|
{
|
|
|
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)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
|
|
|
+#ifdef CONFIG_MEMCG_SWAP
|
|
|
/*
|
|
|
* called from swap_entry_free(). remove record in swap_cgroup and
|
|
|
* uncharge "memsw" account.
|
|
@@ -4518,7 +4518,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
|
|
|
+#ifdef CONFIG_MEMCG_KMEM
|
|
|
static int memcg_init_kmem(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
|
|
|
{
|
|
|
return mem_cgroup_sockets_init(memcg, ss);
|
|
@@ -4608,7 +4608,7 @@ static struct cftype mem_cgroup_files[] = {
|
|
|
.read_seq_string = mem_control_numa_stat_show,
|
|
|
},
|
|
|
#endif
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
|
|
|
+#ifdef CONFIG_MEMCG_SWAP
|
|
|
{
|
|
|
.name = "memsw.usage_in_bytes",
|
|
|
.private = MEMFILE_PRIVATE(_MEMSWAP, RES_USAGE),
|
|
@@ -4795,7 +4795,7 @@ struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg)
|
|
|
}
|
|
|
EXPORT_SYMBOL(parent_mem_cgroup);
|
|
|
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
|
|
|
+#ifdef CONFIG_MEMCG_SWAP
|
|
|
static void __init enable_swap_cgroup(void)
|
|
|
{
|
|
|
if (!mem_cgroup_disabled() && really_do_swap_account)
|
|
@@ -5526,7 +5526,7 @@ struct cgroup_subsys mem_cgroup_subsys = {
|
|
|
.__DEPRECATED_clear_css_refs = true,
|
|
|
};
|
|
|
|
|
|
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
|
|
|
+#ifdef CONFIG_MEMCG_SWAP
|
|
|
static int __init enable_swap_account(char *s)
|
|
|
{
|
|
|
/* consider enabled if no parameter or 1 is given */
|