linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Minchan Kim <minchan@kernel.org>
Cc: "Anton Vorontsov" <anton.vorontsov@linaro.org>,
	"KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Rik van Riel" <riel@redhat.com>, "Pavel Machek" <pavel@ucw.cz>,
	"Greg Kroah-Hartman" <gregkh@suse.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Michal Hocko" <mhocko@suse.cz>,
	"John Stultz" <john.stultz@linaro.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: Android low memory killer vs. memory pressure notifications
Date: Mon, 19 Dec 2011 11:05:09 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1112191059010.19949@chino.kir.corp.google.com> (raw)
In-Reply-To: <20111219074843.GA21324@barrios-laptop.redhat.com>

On Mon, 19 Dec 2011, Minchan Kim wrote:

> Kernel should have just signal role when resource is not enough.
> It is desirable that killing is role of user space.

The low memory killer becomes an out of memory killer very quickly if 
(1) userspace can't respond fast enough and (2) the killed thread cannot 
exit and free its memory fast enough.  It also requires userspace to know 
which threads are sharing memory such that they may all be killed; 
otherwise, killing one thread won't lead to future memory freeing.

If the system becomes oom before userspace can kill a thread, then there's 
no guarantee that it will ever be able to exit.  That's fixed in the 
kernel oom killer by allowing special access to memory reserves 
specifically for this purpose, which userspace can't provide.

So the prerequisites for this to work correctly every time would be to 
ensure that points (1) and (2) above can always happen.  I'm not seeing 
where that's proven, so presumably you'd still always need the kernel oom 
killer.

--
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 internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-12-19 19:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19  2:53 Anton Vorontsov
2011-12-19  7:48 ` Minchan Kim
2011-12-19 19:05   ` David Rientjes [this message]
2011-12-19 10:39 ` Alan Cox
2011-12-19 16:16   ` KOSAKI Motohiro
2011-12-19 16:24     ` Rik van Riel
2011-12-19 12:12 ` Michal Hocko
2011-12-19 19:12   ` David Rientjes
2011-12-20 14:56     ` Anton Vorontsov
2011-12-20 21:36       ` David Rientjes
2011-12-21  0:28         ` Anton Vorontsov
2011-12-21  1:14           ` Frank Rowand
2011-12-21  2:07             ` Anton Vorontsov
2011-12-21  2:30               ` Frank Rowand
2011-12-21 23:41                 ` Anton Vorontsov
2011-12-22  1:16             ` KOSAKI Motohiro
2011-12-22 18:53               ` Frank Rowand
2011-12-21  2:50           ` David Rientjes
2011-12-20  2:16   ` Anton Vorontsov
2011-12-19 16:11 ` KOSAKI Motohiro
2011-12-20  0:30   ` Hiroyuki Kamezawa
2011-12-19 17:30 ` KOSAKI Motohiro
2011-12-19 17:34   ` KOSAKI Motohiro

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=alpine.DEB.2.00.1112191059010.19949@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton.vorontsov@linaro.org \
    --cc=arve@android.com \
    --cc=gregkh@suse.de \
    --cc=john.stultz@linaro.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=minchan@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=riel@redhat.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