From: "Tim Pepper" <lnxninja@us.ibm.com>
To: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <clameter@sgi.com>,
Andrew Morton <akpm@linux-foundation.org>,
Andrea Arcangeli <andrea@suse.de>, Rik van Riel <riel@redhat.com>,
linux-mm@kvack.org, pj@sgi.com
Subject: Re: [patch 3/8] oom: save zonelist pointer for oom killer calls
Date: Wed, 19 Sep 2007 16:51:46 -0700 [thread overview]
Message-ID: <eada2a070709191651i24185d1ep9e0d1829e115ee79@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.0.9999.0709191416380.30290@chino.kir.corp.google.com>
On 9/19/07, David Rientjes <rientjes@google.com> wrote:
> On Wed, 19 Sep 2007, Christoph Lameter wrote:
> > Are there any reasons not to serialize the OOM killer per zone?
>
> That's what this current patchset does, yes. I agree that it is probably
> better done with a bit in struct zone, however.
>
Removing the kzalloc() would be helpful also for the code's
readability in terms of showing (and remembering in the future) its
correctness. If I've read this right, as it stands try_set_zone_oom()
works out to behaving in the following ways for the listed return
values:
ret : behaviour
0: when is_zone_locked() ret's a 1 (ie: because a zone being OOM'd is
already marked OOM locked),
NONE of the current zone(s) are added to the list of OOM zones.
1: when is_zone_locked() ret's all 0's (ie: b/c no zone(s) being OOM'd are
already marked OOM locked), and the kzalloc() failed,
NONE of the current zone(s) are added to the list of OOM zones.
1: when is_zone_locked() ret's all 0's (ie: b/c no zone(s) being OOM'd are
already marked OOM locked),
ALL of the current zone(s) are added to the list of OOM zones.
When no zones in the current zonelist are on the list of OOM zones,
then all the current zones are added to the list of OOM zones...or
none of them depending on how badly OOM'd we are. Tricky.
If any single zone in the current zonelist matches in the list of OOM
zones, none of the current zones are added to the list of OOM zones.
Given the patch header comments, this was done on purpose. But
doesn't that leave your list of OOM zones incomplete and open you to
OOM killing in parallel on a given zone?
Or is that all ok in that you're trying to minimise needlessly OOM
killing something when possible but are willing to throw in the towel
when things are tending towards royally hosed?
At any rate this seems complex with subtly varying behaviour that left
me wondering if it really works as advertised. I imagine without the
kzmalloc and instead checking/setting bits in bitmasks the code would
be cleaner.
Tim
--
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:[~2007-09-19 23:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 18:24 [patch 0/8] oom killer updates David Rientjes
2007-09-19 18:24 ` [patch 1/8] oom: move prototypes to appropriate header file David Rientjes
2007-09-19 18:24 ` [patch 2/8] oom: move constraints to enum David Rientjes
2007-09-19 18:24 ` [patch 3/8] oom: save zonelist pointer for oom killer calls David Rientjes
2007-09-19 18:24 ` [patch 4/8] oom: serialize out of memory calls David Rientjes
2007-09-19 18:24 ` [patch 5/8] oom: add per-cpuset file oom_kill_asking_task David Rientjes
2007-09-19 18:24 ` [patch 6/8] oom: suppress extraneous stack and memory dump David Rientjes
2007-09-19 18:24 ` [patch 7/8] oom: only kill tasks that share zones with zonelist David Rientjes
2007-09-19 18:24 ` [patch 8/8] oom: do not check cpuset in badness scoring David Rientjes
2007-09-19 19:06 ` Christoph Lameter
2007-09-19 18:57 ` [patch 7/8] oom: only kill tasks that share zones with zonelist Christoph Lameter
2007-09-20 5:50 ` David Rientjes
2007-09-20 17:58 ` Christoph Lameter
2007-09-20 18:37 ` David Rientjes
2007-09-20 18:44 ` Christoph Lameter
2007-09-19 19:00 ` [patch 4/8] oom: serialize out of memory calls Christoph Lameter
2007-09-19 20:30 ` David Rientjes
2007-09-19 19:05 ` [patch 3/8] oom: save zonelist pointer for oom killer calls Christoph Lameter
2007-09-19 20:37 ` David Rientjes
2007-09-19 20:54 ` Christoph Lameter
2007-09-19 21:20 ` David Rientjes
2007-09-19 23:51 ` Tim Pepper [this message]
2007-09-20 5:43 ` David Rientjes
2007-09-20 17:56 ` Christoph Lameter
2007-09-19 19:01 ` [patch 1/8] oom: move prototypes to appropriate header file Christoph Lameter
2007-09-19 19:49 ` [patch 0/8] oom killer updates Paul Jackson
2007-09-19 20:24 ` 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=eada2a070709191651i24185d1ep9e0d1829e115ee79@mail.gmail.com \
--to=lnxninja@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andrea@suse.de \
--cc=clameter@sgi.com \
--cc=linux-mm@kvack.org \
--cc=pj@sgi.com \
--cc=riel@redhat.com \
--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