1 From eec171e22de23a8bb7321da2bd405a95d4521f92 Mon Sep 17 00:00:00 2001
2 From: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
3 Date: Tue, 4 Feb 2025 00:55:36 +0900
4 Subject: [PATCH] Revert "cgroup: Disable cgroup "memory" by default"
6 This reverts commit 94a23e978235cd35f38075072b34152b2b667e6e.
8 Upstream-Status: Pending
11 kernel/cgroup/cgroup.c | 38 --------------------------------------
12 1 file changed, 38 deletions(-)
14 diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
15 index 5165f5ccd1b4..518725b57200 100644
16 --- a/kernel/cgroup/cgroup.c
17 +++ b/kernel/cgroup/cgroup.c
18 @@ -6051,9 +6051,6 @@ int __init cgroup_init_early(void)
22 -static u16 cgroup_enable_mask __initdata;
23 -static int __init cgroup_disable(char *str);
26 * cgroup_init - cgroup initialization
28 @@ -6087,12 +6084,6 @@ int __init cgroup_init(void)
33 - * Apply an implicit disable, knowing that an explicit enable will
34 - * prevent if from doing anything.
36 - cgroup_disable("memory");
38 for_each_subsys(ss, ssid) {
40 struct cgroup_subsys_state *css =
41 @@ -6733,10 +6724,6 @@ static int __init cgroup_disable(char *str)
42 strcmp(token, ss->legacy_name))
45 - /* An explicit cgroup_enable overrides a disable */
46 - if (cgroup_enable_mask & (1 << i))
49 static_branch_disable(cgroup_subsys_enabled_key[i]);
50 pr_info("Disabling %s control group subsystem\n",
52 @@ -6755,31 +6742,6 @@ static int __init cgroup_disable(char *str)
54 __setup("cgroup_disable=", cgroup_disable);
56 -static int __init cgroup_enable(char *str)
58 - struct cgroup_subsys *ss;
62 - while ((token = strsep(&str, ",")) != NULL) {
66 - for_each_subsys(ss, i) {
67 - if (strcmp(token, ss->name) &&
68 - strcmp(token, ss->legacy_name))
71 - cgroup_enable_mask |= 1 << i;
72 - static_branch_enable(cgroup_subsys_enabled_key[i]);
73 - pr_info("Enabling %s control group subsystem\n",
79 -__setup("cgroup_enable=", cgroup_enable);
81 void __init __weak enable_debug_cgroup(void) { }
83 static int __init enable_cgroup_debug(char *str)