From: Zhou Guanghui zhouguanghui1@huawei.com
ascend inclusion category: feature bugzilla: NA CVE: NA
-------------------------------------
The function of kmem cgroup is enabled by default for ascend.
Signed-off-by: Zhou Guanghui zhouguanghui1@huawei.com Reviewed-by: Ding Tianhong dingtianhong@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com Signed-off-by: Cheng Jian cj.chengjian@huawei.com --- arch/arm64/mm/init.c | 5 +++++ mm/memcontrol.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index a6b9048ea1a4..0773205251ca 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -789,6 +789,11 @@ void ascend_enable_all_features(void) if (IS_ENABLED(CONFIG_PMU_WATCHDOG)) pmu_nmi_enable = true;
+ if (IS_ENABLED(CONFIG_MEMCG_KMEM)) { + extern bool cgroup_memory_nokmem; + cgroup_memory_nokmem = false; + } + #ifdef CONFIG_ARM64_PSEUDO_NMI enable_pseudo_nmi = true; #endif diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 43e5102f90f0..2553017683e9 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 = true; +bool cgroup_memory_nokmem = true;
/* Whether the swap controller is active */ #ifdef CONFIG_MEMCG_SWAP