linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	Divyesh Shah <dpshah@google.com>,
	linux-mm@kvack.org
Subject: Re: [patch] memcg: add oom killer delay
Date: Mon, 27 Dec 2010 10:47:52 +0900	[thread overview]
Message-ID: <20101227104752.3fb5fc3b.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1012220110480.25848@chino.kir.corp.google.com>

On Wed, 22 Dec 2010 01:21:01 -0800 (PST)
David Rientjes <rientjes@google.com> wrote:

> On Wed, 22 Dec 2010, KAMEZAWA Hiroyuki wrote:
> 
> > For example. oom_check_deadlockd can work as
> > 
> >   1. disable oom by memory.oom_disable=1
> >   2. check memory.oom_notify and wait it by poll()
> >   3. At oom, it wakes up.
> >   4. wait for 60 secs.
> >   5. If the cgroup is still in OOM, set oom_disalble=0
> > 
> > This daemon will not use much memory and can run in /roog memory cgroup.
> > 
> 
> Yes, this is almost the same as the "simple and perfect implementation" 
> that I eluded to in my response to Andrew (and I think KOSAKI-san 
> suggested something similiar), although it doesn't quite work because all 
> threads in the cgroup are sitting on the waitqueue and don't get woken up 
> to see oom_control == 0 unless memory is freed, a task is moved, or the 
> limit is resized so this daemon will need to trigger that as step #6.
> 
> That certainly works if it is indeed perfect and guaranteed to always be 
> running.  In the interest of a robust resource isolation model, I don't 
> think we can ever make that conclusion, though, so this discussion is 
> really only about how fault tolerant the kernel is because the end result 
> is if this daemon fails, the kernel livelocks.
> 
> I'd personally prefer not to allow a buggy or imperfect userspace to allow 
> the kernel to livelock; we control the kernel so I think it would be best 
> to ensure that it cannot livelock no matter what userspace happens to do 
> despite its best effort.  If you or Andrew come to the conclusion that 
> it's overkill and at the end of the day we have to trust userspace, I 
> really can't argue that philosophy though :)
> 

It's not livelock. A user can create a new thread in a cgroup not under OOM.
IMHO, oom-kill itself is totally of-no-use and panic_at_oom or the system
stop is always good. We can do cluster keep alive.

If I was you, I'll add a "pool of memory for emergency cgroup" and run 
watchdog tasks in it.

Thanks,
-Kame





--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-12-27  1:53 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  7:27 David Rientjes
2010-12-22  7:59 ` Andrew Morton
2010-12-22  8:17   ` KAMEZAWA Hiroyuki
2010-12-22  8:31     ` KOSAKI Motohiro
2010-12-22  8:48     ` David Rientjes
2010-12-22  8:48       ` KAMEZAWA Hiroyuki
2010-12-22  8:55         ` KAMEZAWA Hiroyuki
2010-12-22  9:21           ` David Rientjes
2010-12-27  1:47             ` KAMEZAWA Hiroyuki [this message]
2010-12-22  9:04         ` David Rientjes
2010-12-22  8:42   ` David Rientjes
2010-12-22 22:45     ` [patch v2] " David Rientjes
2010-12-27  0:52       ` KAMEZAWA Hiroyuki
2010-12-28  5:22         ` David Rientjes
2010-12-28  6:29           ` [patch v3] " David Rientjes
2011-01-04  1:41             ` KAMEZAWA Hiroyuki
2011-01-04  3:59               ` Balbir Singh
2011-01-06  1:53                 ` KAMEZAWA Hiroyuki
2011-01-06  5:46                   ` Balbir Singh
2011-01-06  5:52                     ` KAMEZAWA Hiroyuki
2010-12-25 10:47 ` [patch] " Balbir Singh
2010-12-26 20:35   ` David Rientjes
2011-02-08  0:24 David Rientjes
2011-02-08  1:55 ` KAMEZAWA Hiroyuki
2011-02-08  2:13   ` David Rientjes
2011-02-08  2:13     ` KAMEZAWA Hiroyuki
2011-02-08  2:20       ` KAMEZAWA Hiroyuki
2011-02-08  2:37         ` David Rientjes
2011-02-08 10:25           ` Balbir Singh
2011-02-09 22:19 ` David Rientjes
2011-02-10  0:04   ` KAMEZAWA Hiroyuki
2011-02-16  3:15     ` David Rientjes
2011-02-20 22:19       ` David Rientjes
2011-02-23 23:08   ` Andrew Morton
2011-02-24  0:13     ` KAMEZAWA Hiroyuki
2011-02-24  0:51     ` David Rientjes
2011-03-03 20:11       ` David Rientjes
2011-03-03 21:52       ` Andrew Morton
2011-03-08  0:12         ` David Rientjes
2011-03-08  0:29           ` Andrew Morton
2011-03-08  0:36             ` David Rientjes
2011-03-08  0:51               ` Andrew Morton
2011-03-08  1:02                 ` David Rientjes
2011-03-08  1:18                   ` Andrew Morton
2011-03-08  1:33                     ` David Rientjes
2011-03-08  2:51                       ` KAMEZAWA Hiroyuki
2011-03-08  3:07                         ` David Rientjes
2011-03-08  3:13                           ` KAMEZAWA Hiroyuki
2011-03-08  3:56                             ` David Rientjes
2011-03-08  4:17                               ` KAMEZAWA Hiroyuki
2011-03-08  5:30                                 ` David Rientjes
2011-03-08  5:49                                   ` KAMEZAWA Hiroyuki
2011-03-08 23:49                                     ` David Rientjes
2011-03-09  6:04                                       ` KAMEZAWA Hiroyuki
2011-03-09  6:44                                         ` David Rientjes
2011-03-09  7:16                                           ` KAMEZAWA Hiroyuki
2011-03-09 21:12                                             ` David Rientjes
2011-03-08  3:06                     ` KAMEZAWA Hiroyuki

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=20101227104752.3fb5fc3b.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=dpshah@google.com \
    --cc=linux-mm@kvack.org \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --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