3a0be628e76d8a986bd78a0a705d3eedec965d00
[AGL/meta-agl.git] /
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"
5
6 This reverts commit 94a23e978235cd35f38075072b34152b2b667e6e.
7
8 Upstream-Status: Pending
9
10 ---
11  kernel/cgroup/cgroup.c | 38 --------------------------------------
12  1 file changed, 38 deletions(-)
13
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)
19         return 0;
20  }
21  
22 -static u16 cgroup_enable_mask __initdata;
23 -static int __init cgroup_disable(char *str);
24 -
25  /**
26   * cgroup_init - cgroup initialization
27   *
28 @@ -6087,12 +6084,6 @@ int __init cgroup_init(void)
29  
30         cgroup_unlock();
31  
32 -       /*
33 -        * Apply an implicit disable, knowing that an explicit enable will
34 -        * prevent if from doing anything.
35 -        */
36 -       cgroup_disable("memory");
37 -
38         for_each_subsys(ss, ssid) {
39                 if (ss->early_init) {
40                         struct cgroup_subsys_state *css =
41 @@ -6733,10 +6724,6 @@ static int __init cgroup_disable(char *str)
42                             strcmp(token, ss->legacy_name))
43                                 continue;
44  
45 -                       /* An explicit cgroup_enable overrides a disable */
46 -                       if (cgroup_enable_mask & (1 << i))
47 -                               continue;
48 -
49                         static_branch_disable(cgroup_subsys_enabled_key[i]);
50                         pr_info("Disabling %s control group subsystem\n",
51                                 ss->name);
52 @@ -6755,31 +6742,6 @@ static int __init cgroup_disable(char *str)
53  }
54  __setup("cgroup_disable=", cgroup_disable);
55  
56 -static int __init cgroup_enable(char *str)
57 -{
58 -       struct cgroup_subsys *ss;
59 -       char *token;
60 -       int i;
61 -
62 -       while ((token = strsep(&str, ",")) != NULL) {
63 -               if (!*token)
64 -                       continue;
65 -
66 -               for_each_subsys(ss, i) {
67 -                       if (strcmp(token, ss->name) &&
68 -                           strcmp(token, ss->legacy_name))
69 -                               continue;
70 -
71 -                       cgroup_enable_mask |= 1 << i;
72 -                       static_branch_enable(cgroup_subsys_enabled_key[i]);
73 -                       pr_info("Enabling %s control group subsystem\n",
74 -                               ss->name);
75 -               }
76 -       }
77 -       return 1;
78 -}
79 -__setup("cgroup_enable=", cgroup_enable);
80 -
81  void __init __weak enable_debug_cgroup(void) { }
82  
83  static int __init enable_cgroup_debug(char *str)
84 -- 
85 2.43.0
86