mm: move oom_kill sysctls to their own file
authorsujiaxun <sujiaxun@uniontech.com>
Fri, 18 Feb 2022 02:51:48 +0000 (18:51 -0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Fri, 18 Feb 2022 18:10:38 +0000 (10:10 -0800)
commit57ab7a2dea6b92202e9b20bf1705827f6b86db1b
tree00e8aab8f5e99e750bc10f910d1872eb2bafd0a8
parentdbef55dfc1e9c14edacdcd6d22489370ae60f6cb
mm: move oom_kill sysctls to their own file

kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
dishes, this makes it very difficult to maintain.

To help with this maintenance let's start by moving sysctls to places
where they actually belong.  The proc sysctl maintainers do not want to
know what sysctl knobs you wish to add for your own piece of code, we just
care about the core logic.

So move the oom_kill sysctls to their own file, mm/oom_kill.c

[sfr@canb.auug.org.au: null-terminate the array]
Link: https://lkml.kernel.org/r/20220216193202.28838626@canb.auug.org.au
Link: https://lkml.kernel.org/r/20220215093203.31032-1-sujiaxun@uniontech.com
Signed-off-by: sujiaxun <sujiaxun@uniontech.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kees Cook <keescook@chromium.org>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
include/linux/oom.h
kernel/sysctl.c
mm/oom_kill.c