linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Aristeu Rozanski <arozansk@redhat.com>,
	linux-kernel@vger.kernel.org, Greg Thelen <gthelen@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, cgroups@vger.kernel.org
Subject: Re: [PATCH] oom_kill: add option to disable dump_stack()
Date: Tue, 1 Dec 2015 16:02:54 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1512011602170.15908@chino.kir.corp.google.com> (raw)
In-Reply-To: <20151201154353.87e2200b5cd1a99289ce6653@linux-foundation.org>

On Tue, 1 Dec 2015, Andrew Morton wrote:

> > --- a/include/linux/oom.h
> > +++ b/include/linux/oom.h
> > @@ -115,6 +115,7 @@ static inline bool task_will_free_mem(struct task_struct *task)
> >  
> >  /* sysctls */
> >  extern int sysctl_oom_dump_tasks;
> > +extern int sysctl_oom_dump_stack;
> >  extern int sysctl_oom_kill_allocating_task;
> >  extern int sysctl_panic_on_oom;
> >  #endif /* _INCLUDE_LINUX_OOM_H */
> > diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> > index e69201d..c812523 100644
> > --- a/kernel/sysctl.c
> > +++ b/kernel/sysctl.c
> > @@ -1176,6 +1176,13 @@ static struct ctl_table vm_table[] = {
> >  		.proc_handler	= proc_dointvec,
> >  	},
> >  	{
> > +		.procname	= "oom_dump_stack",
> > +		.data		= &sysctl_oom_dump_stack,
> > +		.maxlen		= sizeof(sysctl_oom_dump_stack),
> > +		.mode		= 0644,
> > +		.proc_handler	= proc_dointvec,
> > +	},
> > +	{
> >  		.procname	= "overcommit_ratio",
> >  		.data		= &sysctl_overcommit_ratio,
> >  		.maxlen		= sizeof(sysctl_overcommit_ratio),
> > diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> > index 1ecc0bc..bdbf83b 100644
> > --- a/mm/oom_kill.c
> > +++ b/mm/oom_kill.c
> > @@ -42,6 +42,7 @@
> >  int sysctl_panic_on_oom;
> >  int sysctl_oom_kill_allocating_task;
> >  int sysctl_oom_dump_tasks = 1;
> > +int sysctl_oom_dump_stack = 1;
> >  
> >  DEFINE_MUTEX(oom_lock);
> >  
> > @@ -384,7 +385,8 @@ static void dump_header(struct oom_control *oc, struct task_struct *p,
> >  		current->signal->oom_score_adj);
> >  	cpuset_print_task_mems_allowed(current);
> >  	task_unlock(current);
> > -	dump_stack();
> > +	if (sysctl_oom_dump_stack)
> > +		dump_stack();
> >  	if (memcg)
> >  		mem_cgroup_print_oom_info(memcg, p);
> >  	else
> 
> The patch seems reasonable to me, but it's missing the required update
> to Documentation/sysctl/vm.txt.
> 

Not sure why we'd want yet-another-sysctl for something that can trivially 
filtered from the log, but owell.

  reply	other threads:[~2015-12-02  0:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 21:02 [PATCH] oom_kill: add option to disable dump_stack() Aristeu Rozanski
2015-10-26 16:01 ` Johannes Weiner
2015-10-26 17:46   ` Aristeu Rozanski
2015-10-26 17:20 ` Michal Hocko
2015-10-26 17:40   ` Aristeu Rozanski
2015-10-27  8:09     ` Michal Hocko
2015-10-27 15:43       ` Aristeu Rozanski
2015-10-27 16:20         ` Michal Hocko
2015-10-27 17:51           ` Aristeu Rozanski
2015-10-28 23:55             ` David Rientjes
2015-10-26 21:38 ` David Rientjes
2015-12-01 23:43 ` Andrew Morton
2015-12-02  0:02   ` David Rientjes [this message]
2015-12-02  8:18   ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1512011602170.15908@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=arozansk@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).