From 2388a693cb7205a05ba8f789f116bf82f2331822 Mon Sep 17 00:00:00 2001 From: Bixuan Cui Date: Sat, 30 Oct 2021 11:09:22 +0800 Subject: [PATCH] share_pool: move sysctl interface of share pool from kern_table to vm table ascend inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI CVE: NA ------------------------------------------------- The share pool feature belongs to the memory subsystem. Therefore, the sysctl interface is more suitable to be placed in the vm_table. Signed-off-by: Bixuan Cui Reviewed-by: Tang Yizhou Signed-off-by: Yang Yingliang Reviewed-by: Weilong Chen Signed-off-by: Yang Yingliang --- kernel/sysctl.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 97a24290f075..f27ed383227b 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1268,28 +1268,6 @@ static struct ctl_table kern_table[] = { .extra2 = &three, }, -#endif -#ifdef CONFIG_ASCEND_SHARE_POOL - { - /* 0: disable, 1: enable */ - .procname = "share_pool_hugepage_enable", - .data = &sysctl_share_pool_hugepage_enable, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, - }, - { - /* 0: map_unlock, 1: map_lock */ - .procname = "share_pool_map_lock_enable", - .data = &sysctl_share_pool_map_lock_enable, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, - }, #endif { } }; @@ -1801,6 +1779,26 @@ static struct ctl_table vm_table[] = { .extra1 = &zero, .extra2 = &one, }, + { + /* 0: disable, 1: enable */ + .procname = "share_pool_hugepage_enable", + .data = &sysctl_share_pool_hugepage_enable, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &one, + }, + { + /* 0: map_unlock, 1: map_lock */ + .procname = "share_pool_map_lock_enable", + .data = &sysctl_share_pool_map_lock_enable, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &one, + }, #endif { } }; -- GitLab