finish fixing cgroup config option conversion
Subsystems (7)
PATCH 1/1 finish fixing cgroup config option conversion
Andrew, please fold it in your patch so we don't break the build. Some of them are needed not to break the build (in net and swap). And I am taking the change to patch the Documentation file to reflect reality.
Signed-off-by Glauber Costa <[email protected]>
--- Documentation/cgroups/memory.txt | 8 ++++---- include/linux/swap.h | 6 +++--- include/net/sock.h | 4 ++-- mm/Makefile | 2 +- net/core/sock.c | 2 +- net/ipv4/Makefile | 2 +- net/ipv4/sysctl_net_ipv4.c | 4 ++-- net/ipv4/tcp_ipv4.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-)
Documentation/cgroups/memory.txt +4 -4
@@ -192,7 +192,7 @@ When you do swapoff and make swapped-out pages of shmem(tmpfs) to be backed into memory in force, charges for pages are accounted against the caller of swapoff rather than the users of shmem. -2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) +2.4 Swap Extension (CONFIG_MEMCG_SWAP) Swap Extension allows you to record charge for swap. A swapped-in page is charged back to original page allocator if possible.
@@ -259,7 +259,7 @@ When oom event notifier is registered, event will be delivered. per-zone-per-cgroup LRU (cgroup's private LRU) is just guarded by zone->lru_lock, it has no lock of its own. -2.7 Kernel Memory Extension (CONFIG_CGROUP_MEM_RES_CTLR_KMEM) +2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) With the Kernel memory extension, the Memory Controller is able to limit the amount of kernel memory used by the system. Kernel memory is fundamentally
@@ -286,8 +286,8 @@ per cgroup, instead of globally. a. Enable CONFIG_CGROUPS b. Enable CONFIG_RESOURCE_COUNTERS -c. Enable CONFIG_CGROUP_MEM_RES_CTLR -d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension) +c. Enable CONFIG_MEMCG +d. Enable CONFIG_MEMCG_SWAP (to use swap extension) 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) # mount -t tmpfs none /sys/fs/cgroup
include/linux/swap.h +3 -3
@@ -301,7 +301,7 @@ static inline void scan_unevictable_unregister_node(struct node *node)extern int kswapd_run (int nid);extern void kswapd_stop (int nid); -#ifdef CONFIG_CGROUP_MEM_RES_CTLR +#ifdef CONFIG_MEMCG extern int mem_cgroup_swappiness (struct mem_cgroup *mem);#else static inline int mem_cgroup_swappiness (struct mem_cgroup *mem)
@@ -309,7 +309,7 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) return vm_swappiness; }#endif -#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP +#ifdef CONFIG_MEMCG_SWAP extern void mem_cgroup_uncharge_swap (swp_entry_t ent);#else static inline void mem_cgroup_uncharge_swap (swp_entry_t ent)
@@ -360,7 +360,7 @@ extern int reuse_swap_page(struct page *);extern int try_to_free_swap (struct page *);struct backing_dev_info ; -#ifdef CONFIG_CGROUP_MEM_RES_CTLR +#ifdef CONFIG_MEMCG extern void mem_cgroup_uncharge_swapcache (struct page *page,swp_entry_t ent,bool swapout);#else
include/net/sock.h +2 -2
@@ -908,7 +908,7 @@ struct proto {#ifdef SOCK_REFCNT_DEBUG atomic_t socks;#endif -#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM +#ifdef CONFIG_MEMCG_KMEM /* * cgroup specific init/deinit functions. Called once for all * protocols that implement it, from cgroups populate function.
@@ -989,7 +989,7 @@ inline void sk_refcnt_debug_release(const struct sock *sk)#define sk_refcnt_debug_release (sk) do { } while (0)#endif /* SOCK_REFCNT_DEBUG */ -#if defined(CONFIG_CGROUP_MEM_RES_CTLR_KMEM ) && defined(CONFIG_NET ) +#if defined(CONFIG_MEMCG_KMEM ) && defined(CONFIG_NET )extern struct static_key memcg_socket_limit_enabled;static inline struct cg_proto *parent_cg_proto (struct proto *proto,struct cg_proto *cg_proto)
mm/Makefile +1 -1
@@ -48,7 +48,7 @@ obj-$(CONFIG_FS_XIP) += filemap_xip.o obj-$(CONFIG_MIGRATION) += migrate.o obj-$(CONFIG_QUICKLIST) += quicklist.o obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o -obj-$(CONFIG_CGROUP_MEM_RES_CTLR) += memcontrol.o page_cgroup.o +obj-$(CONFIG_MEMCG) += memcontrol.o page_cgroup.o obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o obj-$(CONFIG_HWPOISON_INJECT) += hwpoison-inject.o obj-$(CONFIG_DEBUG_KMEMLEAK) += kmemleak.o
net/core/sock.c +1 -1
@@ -142,7 +142,7 @@static DEFINE_MUTEX (proto_list_mutex);static LIST_HEAD (proto_list); -#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM +#ifdef CONFIG_MEMCG_KMEM int mem_cgroup_sockets_init (struct mem_cgroup *memcg,struct cgroup_subsys *ss) {struct proto *proto;
net/ipv4/Makefile +1 -1
@@ -48,7 +48,7 @@ obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o -obj-$(CONFIG_CGROUP_MEM_RES_CTLR_KMEM) += tcp_memcontrol.o +obj-$(CONFIG_MEMCG_KMEM) += tcp_memcontrol.o obj-$(CONFIG_NETLABEL) += cipso_ipv4.o obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
net/ipv4/sysctl_net_ipv4.c +2 -2
@@ -184,7 +184,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,int ret;unsigned long vec[3 ];struct net *net = current->nsproxy->net_ns; -#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM +#ifdef CONFIG_MEMCG_KMEM struct mem_cgroup *memcg;#endif
@@ -203,7 +203,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,if (ret)return ret; -#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM +#ifdef CONFIG_MEMCG_KMEM rcu_read_lock (); memcg =mem_cgroup_from_task (current);
net/ipv4/tcp_ipv4.c +1 -1
@@ -2614,7 +2614,7 @@ struct proto tcp_prot = { .compat_setsockopt = compat_tcp_setsockopt, .compat_getsockopt = compat_tcp_getsockopt,#endif -#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM +#ifdef CONFIG_MEMCG_KMEM .init_cgroup = tcp_init_cgroup, .destroy_cgroup = tcp_destroy_cgroup, .proto_cgroup = tcp_proto_cgroup,
net/ipv6/tcp_ipv6.c +1 -1
@@ -2069,7 +2069,7 @@ struct proto tcpv6_prot = { .compat_setsockopt = compat_tcp_setsockopt, .compat_getsockopt = compat_tcp_getsockopt,#endif -#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM +#ifdef CONFIG_MEMCG_KMEM .proto_cgroup = tcp_proto_cgroup,#endif };
Signature · 7 lines
1.7.10.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>