public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikanth Karthikesan <knikanth@suse.de>
To: David Rientjes <rientjes@google.com>
Cc: "Evgeniy Polyakov" <zbr@ioremap.net>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Chris Snook" <csnook@redhat.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Paul Menage" <menage@google.com>,
	containers@lists.linux-foundation.org,
	"Balbir Singh" <balbir@linux.vnet.ibm.com>,
	"KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>
Subject: Re: [RFC] [PATCH] Cgroup based OOM killer controller
Date: Tue, 27 Jan 2009 15:50:16 +0530	[thread overview]
Message-ID: <200901271550.16902.knikanth@suse.de> (raw)
In-Reply-To: <alpine.DEB.2.00.0901231230370.14231@chino.kir.corp.google.com>

On Saturday 24 January 2009 02:14:59 David Rientjes wrote:
> On Fri, 23 Jan 2009, Nikanth Karthikesan wrote:
> > In other instances, It can actually also kill some innocent tasks unless
> > the administrator tunes oom_adj, say something like kvm which would have
> > a huge memory accounted, but might be from a different node altogether.
> > Killing a single vm is killing all of the processes in that OS ;)  Don't
> > you think this has to be fixed^Wimproved?
>
> As previously stated, I think the heuristic to penalize tasks for not
> having an intersection with the set of allowable nodes of the oom
> triggering task could be made slightly more severe.  That's irrelevant to
> your patch, though.
>

But the heuristic makes it non-deterministic, unlike memcg case. And this 
mandates special handling for cpuset constrained OOM conditions in this patch.

> > > That's my objection to the proposal: it doesn't behave appropriately
> > > for both global unconstrained ooms and cpuset-constrained ooms at the
> > > same time.
> >
> > So you are against specifying order when it is a cpuset-constrained oom.
> > Here is a revised version of the patch which adds oom.cpuset_constraint,
> > when set to 1 would disable the ordering imposed by this controller for
> > cpuset constrained ooms! Will this work for you?
>
> No, I don't think it's appropriate to add special exemptions for specific
> subsystems to what should be a generic cgroup.  I think it is much more
> powerful to defer these decisions to userspace so each cgroup can attach
> its own handler and implement the necessary decision-making that the
> kernel could never perfectly handle for all possible workloads.
>
> It is trivial to implement the equivalent of this particular change as a
> userspace handler to SIGKILL all tasks in a specific cgroup when the
> cgroup oom handler is woken up at the time of oom.  Additionally, it could
> also respond in other ways such as adding a node to a cpuset, killing a
> less important cgroup, elevate a memory controller limit, send a signal to
> your application to release memory, etc.
>
> We also talked about a cgroup /dev/mem_notify device file that you can
> poll() and learn of low memory situations so that appropriate action can
> be taken even in lowmem situations as opposed to simply oom conditions.
>

Userspace also needs to handle the cpuset constrained _almost-oom_'s 
specially? I wonder how easily userspace can handle that.

> These types of policy decisions belong in userspace.

Yes, policy decisions will be made in user-space using this oom-controller. 
This is just a framework/means to enforce policies. We do not make any 
decisions inside the kernel.

But yes, the badness calculation by the oom killer implements some kind of 
policy inside the kernel, but I guess it can stay, as this oom-controller lets 
user policy over-ride kernel policy. ;-)

Thanks
Nikanth

  reply	other threads:[~2009-01-27 10:22 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 11:08 [RFC] [PATCH] Cgroup based OOM killer controller Nikanth Karthikesan
2009-01-21 13:17 ` Evgeniy Polyakov
2009-01-21 15:24   ` Nikanth Karthikesan
2009-01-21 20:49     ` David Rientjes
2009-01-22  2:53       ` KAMEZAWA Hiroyuki
2009-01-22  5:12         ` Nikanth Karthikesan
2009-01-22  5:12       ` Nikanth Karthikesan
2009-01-22  8:43         ` David Rientjes
2009-01-22  9:23           ` Nikanth Karthikesan
2009-01-22  9:39             ` David Rientjes
2009-01-22 10:10               ` Nikanth Karthikesan
2009-01-22 10:18                 ` David Rientjes
2009-01-22  9:50           ` Evgeniy Polyakov
2009-01-22 10:00             ` David Rientjes
2009-01-22 10:14               ` Evgeniy Polyakov
2009-01-22 10:27                 ` David Rientjes
2009-01-22 13:21                   ` Evgeniy Polyakov
2009-01-22 20:28                     ` David Rientjes
2009-01-22 21:06                       ` Evgeniy Polyakov
2009-01-22 21:35                         ` David Rientjes
2009-01-22 22:04                           ` Evgeniy Polyakov
2009-01-22 22:28                             ` David Rientjes
2009-01-22 22:53                               ` Evgeniy Polyakov
2009-01-22 23:25                                 ` Evgeniy Polyakov
2009-01-27 23:55                     ` Paul Menage
2009-01-23  9:45                   ` Nikanth Karthikesan
2009-01-23 10:33                     ` David Rientjes
2009-01-23 14:56                       ` Nikanth Karthikesan
2009-01-23 20:44                         ` David Rientjes
2009-01-27 10:20                           ` Nikanth Karthikesan [this message]
2009-01-27 10:53                             ` David Rientjes
2009-01-27 11:08                               ` Nikanth Karthikesan
2009-01-27 11:21                                 ` David Rientjes
2009-01-27 11:37                                   ` Nikanth Karthikesan
2009-01-27 20:29                                     ` David Rientjes
2009-01-28  1:00                         ` Paul Menage
2009-01-29 15:48                           ` Nikanth Karthikesan
2009-01-22  3:28 ` KAMEZAWA Hiroyuki
2009-01-22  5:13   ` Nikanth Karthikesan
2009-01-22  5:27     ` KAMEZAWA Hiroyuki
2009-01-22  6:11       ` Nikanth Karthikesan
2009-01-22  5:39     ` Arve Hjønnevåg
2009-01-22  6:12       ` Nikanth Karthikesan
2009-01-22  6:29         ` Arve Hjønnevåg
2009-01-22  6:42           ` Nikanth Karthikesan
2009-01-26 19:54 ` Balbir Singh
2009-01-26 19:56   ` Alan Cox
2009-01-27  7:02     ` KOSAKI Motohiro
2009-01-27  7:26       ` Balbir Singh
2009-01-27  7:39       ` David Rientjes
2009-01-27  7:44         ` KOSAKI Motohiro
2009-01-27  7:51           ` David Rientjes
2009-01-27  9:31             ` Evgeniy Polyakov
2009-01-27  9:37               ` David Rientjes
2009-01-27 13:40                 ` Evgeniy Polyakov
2009-01-27 20:37                   ` David Rientjes
2009-01-27 21:51                     ` Evgeniy Polyakov
2009-01-27 10:40               ` KOSAKI Motohiro
2009-01-27 13:45                 ` Evgeniy Polyakov
2009-01-27 15:40                   ` Balbir Singh
2009-01-27 21:54                     ` Evgeniy Polyakov
2009-01-27 20:41                   ` David Rientjes
2009-01-27 21:55                     ` Evgeniy Polyakov

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=200901271550.16902.knikanth@suse.de \
    --to=knikanth@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arve@android.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=csnook@redhat.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    --cc=zbr@ioremap.net \
    /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