1 From 32839a570568823b3a1128bb1ae6c5fe3e9870af Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Wed, 18 Dec 2013 22:16:19 +0000
4 Subject: [PATCH 024/114] config: Enable CONFIG_MEMCG, but leave it disabled
5 (due to memory cost). Enable with cgroup_enable=memory.
8 arch/arm/configs/bcmrpi_defconfig | 1 +
9 kernel/cgroup.c | 23 +++++++++++++++++++++++
11 3 files changed, 25 insertions(+)
13 --- a/arch/arm/configs/bcmrpi_defconfig
14 +++ b/arch/arm/configs/bcmrpi_defconfig
15 @@ -19,6 +19,7 @@ CONFIG_CGROUP_FREEZER=y
16 CONFIG_CGROUP_DEVICE=y
17 CONFIG_CGROUP_CPUACCT=y
18 CONFIG_RESOURCE_COUNTERS=y
22 CONFIG_SCHED_AUTOGROUP=y
25 @@ -5322,6 +5322,29 @@ static int __init cgroup_disable(char *s
27 __setup("cgroup_disable=", cgroup_disable);
29 +static int __init cgroup_enable(char *str)
31 + struct cgroup_subsys *ss;
35 + while ((token = strsep(&str, ",")) != NULL) {
39 + for_each_subsys(ss, i) {
40 + if (!strcmp(token, ss->name)) {
42 + printk(KERN_INFO "Enabling %s control group"
43 + " subsystem\n", ss->name);
50 +__setup("cgroup_enable=", cgroup_enable);
52 static int __init cgroup_set_legacy_files_on_dfl(char *str)
54 printk("cgroup: using legacy files on the default hierarchy\n");
57 @@ -6207,6 +6207,7 @@ struct cgroup_subsys memory_cgrp_subsys
58 .bind = mem_cgroup_bind,
59 .legacy_cftypes = mem_cgroup_files,
64 #ifdef CONFIG_MEMCG_SWAP