lkml.org 
[lkml]   [2021]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/vmscan: add sysctl knobs for protecting the working set
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

\
 
 \ /
  Last update: 2021-11-30 16:29    [W:0.180 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site