diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index a46b2fe191ba70710832ceeeb961cbedbeff407e..2cb6c844d751a98aefa4939de9b6f2b464ecfc63 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -516,6 +516,10 @@ cio_ignore= [S390] See Documentation/s390/CommonIO for details. + + clear_freelist + Enable clear_freelist feature. + clk_ignore_unused [CLK] Prevents the clock framework from automatically gating diff --git a/mm/clear_freelist_page.c b/mm/clear_freelist_page.c index 69975f458dc79f5acaa78190da5d05cf98097f95..f0a13b8fdcdb748800c4db5b9d863f1a959223f9 100644 --- a/mm/clear_freelist_page.c +++ b/mm/clear_freelist_page.c @@ -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) { - register_sysctl_table(sys_ctl_table); + if (clear_freelist_enabled) + register_sysctl_table(sys_ctl_table); return 0; }