On Mon, 16 Aug 2010 18:16:08 -0700 (PDT) David Rientjes <rientjes@xxxxxxxxxx> wrote: > It's necessary to kill all threads that share an oom killed task's mm if > the goal is to lead to future memory freeing. > > This patch reintroduces the code removed in 8c5cd6f3 (oom: oom_kill > doesn't kill vfork parent (or child)) since it is obsoleted. > > It's now guaranteed that any task passed to oom_kill_task() does not > share an mm with any thread that is unkillable. Thus, we're safe to > issue a SIGKILL to any thread sharing the same mm. > > This is especially necessary to solve an mm->mmap_sem livelock issue > whereas an oom killed thread must acquire the lock in the exit path while > another thread is holding it in the page allocator while trying to > allocate memory itself (and will preempt the oom killer since a task was > already killed). Since tasks with pending fatal signals are now granted > access to memory reserves, the thread holding the lock may quickly > allocate and release the lock so that the oom killed task may exit. > > Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>