1 From 6f2dc468edc31cf2c9b2098566cbbcc1e59b5ad5 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 27/54] config: Enable CONFIG_MEMCG, but leave it disabled (due
5 to memory cost). Enable with cgroup_enable=memory.
8 arch/arm/configs/bcmrpi_defconfig | 1 +
9 kernel/cgroup.c | 27 +++++++++++++++++++++++++++
11 3 files changed, 29 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 @@ -5251,6 +5251,33 @@ 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) {
40 + * cgroup_disable, being at boot time, can't know about
41 + * module subsystems, so we don't worry about them.
43 + for_each_builtin_subsys(ss, i) {
44 + if (!strcmp(token, ss->name)) {
46 + printk(KERN_INFO "Disabling %s control group"
47 + " subsystem\n", ss->name);
54 +__setup("cgroup_enable=", cgroup_enable);
57 * css_from_dir - get corresponding css from the dentry of a cgroup dir
58 * @dentry: directory dentry of interest
61 @@ -7316,6 +7316,7 @@ struct cgroup_subsys mem_cgroup_subsys =
62 .bind = mem_cgroup_bind,
63 .base_cftypes = mem_cgroup_files,
68 #ifdef CONFIG_MEMCG_SWAP