
From: Bixuan Cui <cuibixuan@huawei.com> 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 <cuibixuan@huawei.com> Reviewed-by: Tang Yizhou <tangyizhou@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- kernel/sysctl.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 97a24290f0750..f27ed383227bb 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 { } }; -- 2.25.1