]> git.karo-electronics.de Git - karo-tx-linux.git/commit
After selecting a task to kill, the oom killer iterates all processes and
authorDavid Rientjes <rientjes@google.com>
Wed, 3 Aug 2011 00:52:51 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 22 Aug 2011 03:27:12 +0000 (13:27 +1000)
commitd900aa4ce2d248a0af5b48e56905078f1b9a52e6
tree968ec87bded55d6404df9d874022c0f19f44b940
parent814eca7fff5dfee896ca5ec0031d95f79cdc4d86
After selecting a task to kill, the oom killer iterates all processes and
kills all other threads that share the same mm_struct in different thread
groups.  It would not otherwise be helpful to kill a thread if its memory
would not be subsequently freed.

A kernel thread, however, may assume a user thread's mm by using
use_mm().  This is only temporary and should not result in sending a
SIGKILL to that kthread.

This patch ensures that only user threads and not kthreads are sent a
SIGKILL if they share the same mm_struct as the oom killed task.

Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/oom_kill.c