提交 a08e2009 编写于 作者: C Chen Wandun 提交者: Yang Yingliang

sysctl: add proc interface to set page cache limit

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S
CVE: NA

--------------------------------
Add two proc interfaces to set page cache limit. Both
vm_cache_limit_mbytes and vm_cache_limit_ratio will
be update when writing either of the two interfaces.
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 25d463b5
......@@ -1468,6 +1468,24 @@ static struct ctl_table vm_table[] = {
.extra1 = &zero,
.extra2 = &one,
},
{
.procname = "cache_limit_mbytes",
.data = &vm_cache_limit_mbytes,
.maxlen = sizeof(vm_cache_limit_mbytes),
.mode = 0644,
.proc_handler = cache_limit_mbytes_sysctl_handler,
.extra1 = &vm_cache_limit_mbytes_min,
.extra2 = &vm_cache_limit_mbytes_max,
},
{
.procname = "cache_limit_ratio",
.data = &vm_cache_limit_ratio,
.maxlen = sizeof(vm_cache_limit_ratio),
.mode = 0644,
.proc_handler = cache_limit_ratio_sysctl_handler,
.extra1 = &vm_cache_limit_ratio_min,
.extra2 = &vm_cache_limit_ratio_max,
},
#endif
#ifdef CONFIG_HUGETLB_PAGE
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册