1 From 7793e8e7ab80fb41381652e46dbfe29dae3d7eea 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 128/174] 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 | 31 +++++++++++++++++++++++++++++++
11 3 files changed, 33 insertions(+)
13 --- a/arch/arm/configs/bcmrpi_defconfig
14 +++ b/arch/arm/configs/bcmrpi_defconfig
15 @@ -18,6 +18,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 @@ -5127,6 +5127,37 @@ static int __init cgroup_disable(char *s
27 __setup("cgroup_disable=", cgroup_disable);
29 +static int __init cgroup_enable(char *str)
34 + while ((token = strsep(&str, ",")) != NULL) {
37 + for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
38 + struct cgroup_subsys *ss = subsys[i];
41 + * cgroup_enable, being at boot time, can't
42 + * know about module subsystems, so we don't
45 + if (!ss || ss->module)
48 + if (!strcmp(token, ss->name)) {
50 + printk(KERN_INFO "Enabling %s control group"
51 + " subsystem\n", ss->name);
58 +__setup("cgroup_enable=", cgroup_enable);
61 * Functons for CSS ID.
65 @@ -6970,6 +6970,7 @@ struct cgroup_subsys mem_cgroup_subsys =
66 .base_cftypes = mem_cgroup_files,
72 #ifdef CONFIG_MEMCG_SWAP