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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]