linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: David Rientjes <rientjes@google.com>
Cc: clameter@sgi.com, andrea@suse.de, akpm@linux-foundation.org,
	linux-mm@kvack.org
Subject: Re: [patch 4/4] oom: serialize for cpusets
Date: Thu, 28 Jun 2007 11:55:37 -0700	[thread overview]
Message-ID: <20070628115537.56344465.pj@sgi.com> (raw)
In-Reply-To: <alpine.DEB.0.99.0706281104490.20980@chino.kir.corp.google.com>

> So my belief is that it is better to kill one large memory-hogging task in 
> a cpuset instead of killing multiple smaller ones based on their 
> scheduling and unfortunate luck of being the one to enter the OOM killer.  

So ... sounds like you're arguing from principle, not from having some
specific customer biting at your heels.

Ok.

My guess is that what happened here is that, back in the earlier days of
cpusets, when most people looked on it with a bit of suspicion, and few
depended on it for their livelihood, my good colleague Christoph Lameter
got in a change to avoid the OOM scoring for cpuset constrained tasks,
and instead just shoot the messenger - kill the task asking for the
memory.

At the time, I was a little surprised he got that change in, but it
suited the needs of our particular customers, so I happily kept quiet.

Now, cpusets are finding wider usage, in ways I never would have
imagined. I guess by and large I did a good enough job of designing
them from principle, not from the specific needs of my (rather odd)
customers that now cpusets have found other users and uses.  Good.

But this particular change, avoiding OOM scoring on cpuset constrained
tasks, is probably more of a heuristic that will fit some uses, not others.

Sounds like its time for a tunable, to determine whether or not to OOM
score cpuset constrained tasks.

As for the default of the tunable, I could argue that it should default to
the current behaviour (avoid OOM scoring cpuset constrained tasks), for
compatibility.  And you could argue that it should default to OOM scoring
even cpuset constrained tasks, because that is what a larger set of users
will expect and need.  Grumble, grumble ... I wish I could think of a
reason why you'd be wrong to say that, and thereby save myself some work
adding hooks to my user space code to flip this tunable to the way I need
it (don't OOM score cpuset constrained tasks.) ... so far nothing ... drat.

Would you like to propose a patch, adding a per-cpuset Boolean flag
that has inheritance properties similar to the memory_spread_* flags?
Set at the top and inherited on cpuset creation; overridable per-cpuset.

How about calling it "oom_kill_asking_task", defaulting to 0 (the
default you will like, not the one I will use for my customers.)

You can leave it up to me to provide such a patch, but I can pretty much
promise I won't get to it for the next two or three months, at least.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

--
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>

  reply	other threads:[~2007-06-28 18:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-27 14:44 [patch 1/4] oom: extract deadlock helper function David Rientjes
2007-06-27 14:44 ` [patch 2/4] oom: select process to kill for cpusets David Rientjes
2007-06-27 14:44   ` [patch 3/4] oom: extract select helper function David Rientjes
2007-06-27 14:44     ` [patch 4/4] oom: serialize for cpusets David Rientjes
2007-06-27 21:53       ` Christoph Lameter
2007-06-27 22:13         ` Paul Jackson
2007-06-28  6:24           ` David Rientjes
2007-06-28  7:33             ` Paul Jackson
2007-06-28  8:05               ` David Rientjes
2007-06-28  9:03                 ` Paul Jackson
2007-06-28 18:13                   ` David Rientjes
2007-06-28 18:55                     ` Paul Jackson [this message]
2007-06-28 19:27                       ` Paul Menage
2007-06-28 20:15                         ` Paul Jackson
2007-06-28 20:43                       ` David Rientjes
2007-06-29  1:33                     ` Christoph Lameter
2007-06-29  4:07                       ` David Rientjes
2007-06-28  0:26         ` Andrea Arcangeli
2007-06-28 20:41       ` [patch 5/4] oom: add oom_kill_asking_task flag David Rientjes
2007-06-28 22:07         ` Paul Jackson
2007-06-27 21:52   ` [patch 2/4] oom: select process to kill for cpusets Christoph Lameter
2007-06-28  6:13     ` David Rientjes
2007-07-26  6:15 ` [patch 1/4] oom: extract deadlock helper function David Rientjes
2007-07-26  6:25   ` Andrew Morton
2007-07-26  7:29     ` 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=20070628115537.56344465.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrea@suse.de \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.org \
    --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