linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric B Munson <emunson@akamai.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] oom: always panic on OOM when panic_on_oom is configured
Date: Mon, 1 Jun 2015 11:12:39 -0400	[thread overview]
Message-ID: <20150601151239.GA14282@akamai.com> (raw)
In-Reply-To: <1433159948-9912-1-git-send-email-mhocko@suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]

On Mon, 01 Jun 2015, Michal Hocko wrote:

> panic_on_oom allows administrator to set OOM policy to panic the system
> when it is out of memory to reduce failover time e.g. when resolving
> the OOM condition would take much more time than rebooting the system.
> 
> out_of_memory tries to be clever and prevent from premature panics
> by checking the current task and prevent from panic when the task
> has fatal signal pending and so it should die shortly and release some
> memory. This is fair enough but Tetsuo Handa has noted that this might
> lead to a silent deadlock when current cannot exit because of
> dependencies invisible to the OOM killer.
> 
> panic_on_oom is disabled by default and if somebody enables it then any
> risk of potential deadlock is certainly unwelcome. The risk is really
> low because there are usually more sources of allocation requests and
> one of them would eventually trigger the panic but it is better to
> reduce the risk as much as possible.
> 
> Let's move check_panic_on_oom up before the current task is
> checked so that the knob value is . Do the same for the memcg in
> mem_cgroup_out_of_memory.
> 
> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>

I was initially going to complain about this causing the machine to
panic when a cgroup is oom, but the machine is not.  However after
reading check_panic_on_oom(), that behavior is controllable.

Reviewed-by: Eric B Munson <emunson@akamai.com>


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-06-01 15:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 11:59 Michal Hocko
2015-06-01 15:12 ` Eric B Munson [this message]
2015-06-04 23:12 ` David Rientjes
2015-06-05 11:13   ` Michal Hocko
2015-06-06  6:51     ` Tetsuo Handa
2015-06-08  8:21       ` Michal Hocko
2015-06-08 11:53         ` Tetsuo Handa
2015-06-08 19:58       ` David Rientjes
2015-06-09 11:48         ` oom: How to handle !__GFP_FS exception? Tetsuo Handa
2015-06-09 22:41           ` David Rientjes
2015-06-08 19:51     ` [PATCH] oom: always panic on OOM when panic_on_oom is configured David Rientjes
2015-06-08 21:32       ` Michal Hocko
2015-06-08 23:20         ` David Rientjes
2015-06-09  9:43           ` Michal Hocko
2015-06-09 22:28             ` David Rientjes
2015-06-10  7:52               ` Michal Hocko
2015-06-11  0:36                 ` David Rientjes

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=20150601151239.GA14282@akamai.com \
    --to=emunson@akamai.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=rientjes@google.com \
    /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