提交 b6bcd500 编写于 作者: W Weilong Chen 提交者: Yang Yingliang

arm64/ascend: Add set hugepage number helper function

ascend inclusion
category: feature
bugzilla: NA
CVE: NA

-------------------------------------------------

Add helper function for change system hugepage nr, and export it out.
Signed-off-by: NWeilong Chen <chenweilong@huawei.com>
Reviewed-by: NDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d9952490
...@@ -3068,6 +3068,19 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write, ...@@ -3068,6 +3068,19 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write,
buffer, length, ppos); buffer, length, ppos);
} }
#ifdef CONFIG_ASCEND_AUTO_TUNING_HUGEPAGE
int hugetlb_sysctl_store(size_t length)
{
int ret;
struct hstate *h = &default_hstate;
ret = __nr_hugepages_store_common(false, h, NUMA_NO_NODE, length,
length);
return ret;
}
EXPORT_SYMBOL(hugetlb_sysctl_store);
#endif
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
int hugetlb_mempolicy_sysctl_handler(struct ctl_table *table, int write, int hugetlb_mempolicy_sysctl_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *length, loff_t *ppos) void __user *buffer, size_t *length, loff_t *ppos)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册