Re: [PATCH] mm/vmscan: add sysctl knobs for protecting the working set
From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2021-11-30 15:28:51
Also in:
linux-fsdevel, linux-mm, lkml
From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2021-11-30 15:28:51
Also in:
linux-fsdevel, linux-mm, lkml
On Tue, Nov 30, 2021 at 08:16:52PM +0900, Alexey Avramov wrote:
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 083be6af2..65fc38756 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c@@ -3132,6 +3132,27 @@ static struct ctl_table vm_table[] = { }, #endif { + .procname = "anon_min_kbytes", + .data = &sysctl_anon_min_kbytes, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = proc_doulongvec_minmax, + }, + { + .procname = "clean_low_kbytes", + .data = &sysctl_clean_low_kbytes, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = proc_doulongvec_minmax, + }, + { + .procname = "clean_min_kbytes", + .data = &sysctl_clean_min_kbytes, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = proc_doulongvec_minmax, + }, + { .procname = "user_reserve_kbytes", .data = &sysctl_user_reserve_kbytes, .maxlen = sizeof(sysctl_user_reserve_kbytes),
Please don't clutter this file anymore than what we have with random
sysctls, as otherwise it becomes a pain to deal with merge conficts.
You can use register_sysctl_init("vm", whatever_your_local_table_name)
within the file you are adding your sysctl.
Luis