提交 bbe91ce5 编写于 作者: Y Yu Liao 提交者: Yongqiang Liu

mm: introduce "clear_freelist" kernel parameter

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

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

CONFIG_CLEAR_FREELIST_PAGE specifies the default value for clear
freelist. Add a kernel parameter to make it possible to
override the default. Keep clear_freelist disabled unless
"clear_freelist" is explicitly specified.
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NLaibin Qiu <qiulaibin@huawei.com>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 f58d6d4a
...@@ -516,6 +516,10 @@ ...@@ -516,6 +516,10 @@
cio_ignore= [S390] cio_ignore= [S390]
See Documentation/s390/CommonIO for details. See Documentation/s390/CommonIO for details.
clear_freelist
Enable clear_freelist feature.
clk_ignore_unused clk_ignore_unused
[CLK] [CLK]
Prevents the clock framework from automatically gating Prevents the clock framework from automatically gating
......
...@@ -154,9 +154,18 @@ static struct ctl_table sys_ctl_table[] = { ...@@ -154,9 +154,18 @@ static struct ctl_table sys_ctl_table[] = {
{ } { }
}; };
static bool clear_freelist_enabled;
static int __init setup_clear_freelist(char *str)
{
clear_freelist_enabled = true;
return 1;
}
__setup("clear_freelist", setup_clear_freelist);
static int __init clear_freelist_init(void) static int __init clear_freelist_init(void)
{ {
register_sysctl_table(sys_ctl_table); if (clear_freelist_enabled)
register_sysctl_table(sys_ctl_table);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册