| From: Andrew Morton <akpm@linux-foundation.org> |
| Subject: sysctl-move-some-boundary-constants-from-sysctlc-to-sysctl_vals-fix |
| |
| update it for "mm/pagealloc: sysctl: change watermark_scale_factor max |
| limit to 30%". |
| |
| Cc: Xiaoming Ni <nixiaoming@huawei.com> |
| Cc: Suren Baghdasaryan <surenb@google.com> |
| Cc: Al Viro <viro@zeniv.linux.org.uk> |
| Cc: Amir Goldstein <amir73il@gmail.com> |
| Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
| Cc: Antti Palosaari <crope@iki.fi> |
| Cc: Arnd Bergmann <arnd@arndb.de> |
| Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
| Cc: Benjamin LaHaise <bcrl@kvack.org> |
| Cc: Clemens Ladisch <clemens@ladisch.de> |
| Cc: David Airlie <airlied@linux.ie> |
| Cc: Douglas Gilbert <dgilbert@interlog.com> |
| Cc: Eric Biederman <ebiederm@xmission.com> |
| Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| Cc: Iurii Zaikin <yzaikin@google.com> |
| Cc: James E.J. Bottomley <jejb@linux.ibm.com> |
| Cc: Jani Nikula <jani.nikula@intel.com> |
| Cc: Jani Nikula <jani.nikula@linux.intel.com> |
| Cc: Jan Kara <jack@suse.cz> |
| Cc: Joel Becker <jlbec@evilplan.org> |
| Cc: John Ogness <john.ogness@linutronix.de> |
| Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> |
| Cc: Joseph Qi <joseph.qi@linux.alibaba.com> |
| Cc: Julia Lawall <julia.lawall@inria.fr> |
| Cc: Kees Cook <keescook@chromium.org> |
| Cc: Luis Chamberlain <mcgrof@kernel.org> |
| Cc: Lukas Middendorf <kernel@tuxforce.de> |
| Cc: Mark Fasheh <mark@fasheh.com> |
| Cc: Martin K. Petersen <martin.petersen@oracle.com> |
| Cc: Paul Turner <pjt@google.com> |
| Cc: Peter Zijlstra <peterz@infradead.org> |
| Cc: Petr Mladek <pmladek@suse.com> |
| Cc: Phillip Potter <phil@philpotter.co.uk> |
| Cc: Qing Wang <wangqing@vivo.com> |
| Cc: "Rafael J. Wysocki" <rafael@kernel.org> |
| Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> |
| Cc: Sebastian Reichel <sre@kernel.org> |
| Cc: Sergey Senozhatsky <senozhatsky@chromium.org> |
| Cc: Stephen Kitt <steve@sk2.org> |
| Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> |
| Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> |
| Cc: "Theodore Ts'o" <tytso@mit.edu> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| fs/proc/proc_sysctl.c | 2 +- |
| include/linux/sysctl.h | 3 ++- |
| kernel/sysctl.c | 3 +-- |
| 3 files changed, 4 insertions(+), 4 deletions(-) |
| |
| --- a/fs/proc/proc_sysctl.c~sysctl-move-some-boundary-constants-from-sysctlc-to-sysctl_vals-fix |
| +++ a/fs/proc/proc_sysctl.c |
| @@ -26,7 +26,7 @@ static const struct file_operations proc |
| static const struct inode_operations proc_sys_dir_operations; |
| |
| /* shared constants to be used in various sysctls */ |
| -const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, INT_MAX }; |
| +const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 3000, INT_MAX }; |
| EXPORT_SYMBOL(sysctl_vals); |
| |
| /* Support for permanently empty directories */ |
| --- a/include/linux/sysctl.h~sysctl-move-some-boundary-constants-from-sysctlc-to-sysctl_vals-fix |
| +++ a/include/linux/sysctl.h |
| @@ -46,7 +46,8 @@ struct ctl_dir; |
| #define SYSCTL_ONE_HUNDRED ((void *)&sysctl_vals[5]) |
| #define SYSCTL_TWO_HUNDRED ((void *)&sysctl_vals[6]) |
| #define SYSCTL_ONE_THOUSAND ((void *)&sysctl_vals[7]) |
| -#define SYSCTL_INT_MAX ((void *)&sysctl_vals[8]) |
| +#define SYSCTL_THREE_THOUSAND ((void *)&sysctl_vals[8]) |
| +#define SYSCTL_INT_MAX ((void *)&sysctl_vals[9]) |
| |
| extern const int sysctl_vals[]; |
| |
| --- a/kernel/sysctl.c~sysctl-move-some-boundary-constants-from-sysctlc-to-sysctl_vals-fix |
| +++ a/kernel/sysctl.c |
| @@ -117,7 +117,6 @@ static int sixty = 60; |
| static unsigned long zero_ul; |
| static unsigned long one_ul = 1; |
| static unsigned long long_max = LONG_MAX; |
| -static int three_thousand = 3000; |
| #ifdef CONFIG_PRINTK |
| static int ten_thousand = 10000; |
| #endif |
| @@ -2955,7 +2954,7 @@ static struct ctl_table vm_table[] = { |
| .mode = 0644, |
| .proc_handler = watermark_scale_factor_sysctl_handler, |
| .extra1 = SYSCTL_ONE, |
| - .extra2 = &three_thousand, |
| + .extra2 = SYSCTL_THREE_THOUSAND, |
| }, |
| { |
| .procname = "percpu_pagelist_high_fraction", |
| _ |