From: Larry Woodman <lwoodman@redhat.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sysctl_panic_on_oom broken
Date: Tue, 17 Apr 2007 20:24:35 -0400 [thread overview]
Message-ID: <1176855875.3959.7.camel@dhcp83-56.boston.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0704171438390.8082@schroedinger.engr.sgi.com>
On Tue, 2007-04-17 at 14:39 -0700, Christoph Lameter wrote:
>
> It recreates the old problem that we OOM while we still have memory
> in other parts of the system.
How, by the time we get here we have already decided we are going to
OOMkill or panic. This change just obeys sysctl_panic_on_oom before
killing current.
-----------------------------------------------------------------------
/* check if we are going to panic before enything else... */
if (sysctl_panic_on_oom)
panic("out of memory. panic_on_oom is selected\n");
/*
* Check if there were limitations on the allocation
* NUMA) that may require different handling.
*/
switch (constrained_alloc(zonelist, gfp_mask)) {
case CONSTRAINT_MEMORY_POLICY:
oom_kill_process(current, points,
"No available memory (MPOL_BIND)");
break;
case CONSTRAINT_CPUSET:
oom_kill_process(current, points,
"No available memory in cpuset");
break;
case CONSTRAINT_NONE:
retry:
/*
* Rambo mode: Shoot down a process and hope
* issues we may have.
*/
p = select_bad_process(&points);
if (PTR_ERR(p) == -1UL)
goto out;
/* Found nothing?!?! Either we hang or we panic. */
next prev parent reply other threads:[~2007-04-18 1:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-17 18:45 Larry Woodman
2007-04-17 21:39 ` Christoph Lameter
2007-04-18 0:24 ` Larry Woodman [this message]
2007-04-18 4:54 ` Christoph Lameter
2007-04-18 2:28 ` Yasunori Goto
2007-04-18 4:56 ` Christoph Lameter
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=1176855875.3959.7.camel@dhcp83-56.boston.redhat.com \
--to=lwoodman@redhat.com \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®