lkml.org 
[lkml]   [2011]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Android low memory killer vs. memory pressure notifications
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.


\
 
 \ /
  Last update: 2011-12-19 20:07    [W:0.138 / U:2.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site