From 23e7bcb2266dede2ce38ead27b3a3ddc5fa8337b Mon Sep 17 00:00:00 2001 From: Kaixu Xia Date: Fri, 16 Jul 2021 11:27:32 +0800 Subject: [PATCH] cgroup/memory: disable kmem limit by default Disable kmem limit by default, and it can be enabled by kernel parameter. --- mm/memcontrol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7502c953d..2946617cf 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -85,7 +85,7 @@ struct mem_cgroup *root_mem_cgroup __read_mostly; static bool cgroup_memory_nosocket; /* Kernel memory accounting disabled? */ -static bool cgroup_memory_nokmem; +static bool cgroup_memory_nokmem = true; /* Whether the swap controller is active */ #ifdef CONFIG_MEMCG_SWAP @@ -6230,8 +6230,8 @@ static int __init cgroup_memory(char *s) continue; if (!strcmp(token, "nosocket")) cgroup_memory_nosocket = true; - if (!strcmp(token, "nokmem")) - cgroup_memory_nokmem = true; + if (!strcmp(token, "kmem")) + cgroup_memory_nokmem = false; } return 0; }