From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Nick Piggin <npiggin@suse.de>, Kirill Korotaev <dev@sw.ru>,
Linux Memory Management <linux-mm@kvack.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch 5/5] oom: invoke OOM killer from pagefault handler
Date: Fri, 13 Oct 2006 16:45:49 +1000 [thread overview]
Message-ID: <452F361D.1010306@yahoo.com.au> (raw)
In-Reply-To: <20061012150942.42e05898.akpm@osdl.org>
Andrew Morton wrote:
>On Thu, 12 Oct 2006 17:19:07 +0200
>Nick Piggin <npiggin@suse.de> wrote:
>
>
>>On Thu, Oct 12, 2006 at 07:12:13PM +0400, Kirill Korotaev wrote:
>>
>>>Nick,
>>>
>>>AFAICS, 1 page allocation which is done in page fault handler
>>>can fail in the only case - OOM kills current, so if we failed
>>>we should have TIF_MEMDIE and just kill current.
>>>Selecting another process for killing if page fault fails means
>>>taking another victim with the one being already killed.
>>>
>>>
>>Hi Kirill,
>>
>>I don't quite understand you.
>>
>
>Kirill is claiming that the only occasion on which a pagefault handler would
>get an oom is when it killed itself in the oom handler.
>
Well I don't think that should happen much. When the process gets OOM
killed,
it is given full access to all memory reserves, so it will be _less_ likely
to go OOM maybe.
Actually if you work it through, maybe that isn't the case -- our
infinite retry
logic in the allocator means that non OOM killed tasks will never return
NULL,
while the OOM task might just use up every single free page in the
system and
will eventually return NULL. In this case the system is probably on
death's door
though, so I don't know if it is worth worrying about.
>>If the page allocation fails in the
>>fault handler, we don't want to kill current if it is marked as
>>OOM_DISABLE or sysctl_panic_on_oom is set... imagine a critical
>>service in a failover system.
>>
>>It should be quite likely for another process to be kiled and
>>provide enough memory to keep the system running. Presuming you
>>have faith in the concept of the OOM killer ;)
>>
>
>I'm a bit wobbly about this one. Some before-and-after testing results
>would help things along..
>
I can force VM_FAULT_OOMs to happen, but it is difficult to make it
happen in
the real world because most fault handling paths don't allocate higher order
allocations.
What I especially have in mind here is the OOM_DISABLE and panic_on_oom
sysctl
rather than expecting particularly much better general oom killing
behaviour.
Suppose you have a critical failover node or heartbeat process or something
where you'd rather the system to panic and reboot instead of doing something
silly...
--
Send instant messages to your online friends http://au.messenger.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-10-13 6:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 14:09 [rfc][patch 0/5] 2.6.19-rc1: oom killer fixes Nick Piggin
2006-10-12 14:09 ` [patch 1/5] oom: don't kill unkillable children or siblings Nick Piggin
2006-10-12 22:00 ` Andrew Morton
2006-10-13 6:31 ` Nick Piggin
2006-10-12 14:09 ` [patch 2/5] oom: cleanup messages Nick Piggin
2006-10-12 14:10 ` [patch 3/5] oom: less memdie Nick Piggin
2006-10-12 22:03 ` Andrew Morton
2006-10-13 6:38 ` Nick Piggin
2006-10-12 14:10 ` [patch 4/5] mm: incorrect VM_FAULT_OOM returns from drivers Nick Piggin
2006-10-12 14:10 ` [patch 5/5] oom: invoke OOM killer from pagefault handler Nick Piggin
2006-10-12 15:12 ` Kirill Korotaev
2006-10-12 15:19 ` Nick Piggin
2006-10-12 22:09 ` Andrew Morton
2006-10-13 6:45 ` Nick Piggin [this message]
2006-10-13 6:47 ` Nick Piggin
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=452F361D.1010306@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=dev@sw.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
/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