1 From efd60949b03b034da398f15fc9b74d3f3a06c48a 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 033/203] config: Enable CONFIG_MEMCG, but leave it disabled
5 (due to memory cost). Enable with cgroup_enable=memory.
8 kernel/cgroup.c | 23 +++++++++++++++++++++++
10 2 files changed, 24 insertions(+)
14 @@ -5394,6 +5394,29 @@ static int __init cgroup_disable(char *s
16 __setup("cgroup_disable=", cgroup_disable);
18 +static int __init cgroup_enable(char *str)
20 + struct cgroup_subsys *ss;
24 + while ((token = strsep(&str, ",")) != NULL) {
28 + for_each_subsys(ss, i) {
29 + if (!strcmp(token, ss->name)) {
31 + printk(KERN_INFO "Enabling %s control group"
32 + " subsystem\n", ss->name);
39 +__setup("cgroup_enable=", cgroup_enable);
41 static int __init cgroup_set_legacy_files_on_dfl(char *str)
43 printk("cgroup: using legacy files on the default hierarchy\n");
46 @@ -5388,6 +5388,7 @@ struct cgroup_subsys memory_cgrp_subsys
47 .dfl_cftypes = memory_files,
48 .legacy_cftypes = mem_cgroup_legacy_files,