Thread (41 messages) 41 messages, 4 authors, 2016-06-02

Re: [PATCH 4/6] mm, oom: skip vforked tasks from being selected

From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: 2016-06-02 11:32:06

Michal Hocko wrote:
OK, but the memory is allocated on behalf of the parent already, right?
What does "the memory is allocated on behalf of the parent already" mean?
The memory used for argv[]/envp[] may not yet be visible from mm_struct when
the OOM killer is invoked.
And the patch doesn't prevent parent from being selected and the vfroked
child being killed along the way as sharing the mm with it. So what
exactly this patch changes for this test case? What am I missing?
If the parent is OOM_SCORE_ADJ_MIN and vfork()ed child doing execve()
with large argv[]/envp[] is not OOM_SCORE_ADJ_MIN, we should not hesitate
to OOM-kill vfork()ed child even if the parent is not OOM-killable.

	vfork()
	set_oom_adj()
	exec()

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help