mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 08:35:19 -05:00
mm/oom_kill.c: fix vm_oom_kill_table[] ifdeffery
arm allnoconfig: mm/oom_kill.c:60:25: warning: 'vm_oom_kill_table' defined but not used [-Wunused-variable] 60 | static struct ctl_table vm_oom_kill_table[] = { | ^~~~~~~~~~~~~~~~~ Cc: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
b3e34a47f9
commit
a19cad0691
1 changed files with 29 additions and 29 deletions
|
@ -56,35 +56,6 @@ static int sysctl_panic_on_oom;
|
||||||
static int sysctl_oom_kill_allocating_task;
|
static int sysctl_oom_kill_allocating_task;
|
||||||
static int sysctl_oom_dump_tasks = 1;
|
static int sysctl_oom_dump_tasks = 1;
|
||||||
|
|
||||||
#ifdef CONFIG_SYSCTL
|
|
||||||
static struct ctl_table vm_oom_kill_table[] = {
|
|
||||||
{
|
|
||||||
.procname = "panic_on_oom",
|
|
||||||
.data = &sysctl_panic_on_oom,
|
|
||||||
.maxlen = sizeof(sysctl_panic_on_oom),
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dointvec_minmax,
|
|
||||||
.extra1 = SYSCTL_ZERO,
|
|
||||||
.extra2 = SYSCTL_TWO,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.procname = "oom_kill_allocating_task",
|
|
||||||
.data = &sysctl_oom_kill_allocating_task,
|
|
||||||
.maxlen = sizeof(sysctl_oom_kill_allocating_task),
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dointvec,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.procname = "oom_dump_tasks",
|
|
||||||
.data = &sysctl_oom_dump_tasks,
|
|
||||||
.maxlen = sizeof(sysctl_oom_dump_tasks),
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = proc_dointvec,
|
|
||||||
},
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Serializes oom killer invocations (out_of_memory()) from all contexts to
|
* Serializes oom killer invocations (out_of_memory()) from all contexts to
|
||||||
* prevent from over eager oom killing (e.g. when the oom killer is invoked
|
* prevent from over eager oom killing (e.g. when the oom killer is invoked
|
||||||
|
@ -729,6 +700,35 @@ static void queue_oom_reaper(struct task_struct *tsk)
|
||||||
add_timer(&tsk->oom_reaper_timer);
|
add_timer(&tsk->oom_reaper_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SYSCTL
|
||||||
|
static struct ctl_table vm_oom_kill_table[] = {
|
||||||
|
{
|
||||||
|
.procname = "panic_on_oom",
|
||||||
|
.data = &sysctl_panic_on_oom,
|
||||||
|
.maxlen = sizeof(sysctl_panic_on_oom),
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dointvec_minmax,
|
||||||
|
.extra1 = SYSCTL_ZERO,
|
||||||
|
.extra2 = SYSCTL_TWO,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.procname = "oom_kill_allocating_task",
|
||||||
|
.data = &sysctl_oom_kill_allocating_task,
|
||||||
|
.maxlen = sizeof(sysctl_oom_kill_allocating_task),
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dointvec,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.procname = "oom_dump_tasks",
|
||||||
|
.data = &sysctl_oom_dump_tasks,
|
||||||
|
.maxlen = sizeof(sysctl_oom_dump_tasks),
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dointvec,
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int __init oom_init(void)
|
static int __init oom_init(void)
|
||||||
{
|
{
|
||||||
oom_reaper_th = kthread_run(oom_reaper, NULL, "oom_reaper");
|
oom_reaper_th = kthread_run(oom_reaper, NULL, "oom_reaper");
|
||||||
|
|
Loading…
Reference in a new issue