Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-03 Thread Michal Hocko
On Tue 02-12-14 20:16:22, Oleg Nesterov wrote: > On 12/02, Michal Hocko wrote: > > > > On Tue 02-12-14 18:50:41, Oleg Nesterov wrote: > > > On 12/02, Michal Hocko wrote: > > > > > > > > I guess the patch as is makes sense and it is an improvement. We need > > > > to call the helper in

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-03 Thread Michal Hocko
On Tue 02-12-14 20:16:22, Oleg Nesterov wrote: On 12/02, Michal Hocko wrote: On Tue 02-12-14 18:50:41, Oleg Nesterov wrote: On 12/02, Michal Hocko wrote: I guess the patch as is makes sense and it is an improvement. We need to call the helper in mem_cgroup_out_of_memory as

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Oleg Nesterov
On 12/02, Michal Hocko wrote: > > On Tue 02-12-14 18:50:41, Oleg Nesterov wrote: > > On 12/02, Michal Hocko wrote: > > > > > > I guess the patch as is makes sense and it is an improvement. We need > > > to call the helper in mem_cgroup_out_of_memory as well, though. > > > > Yes, but can't we do

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Michal Hocko
On Tue 02-12-14 18:50:41, Oleg Nesterov wrote: > On 12/02, Michal Hocko wrote: > > > > On Fri 28-11-14 00:04:05, Oleg Nesterov wrote: > > > > > Note: this is only the first step, this patch doesn't try to solve other > > > problems. For example it doesn't try to clear the wrongly set TIF_MEMDIE >

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Oleg Nesterov
On 12/02, Michal Hocko wrote: > > On Fri 28-11-14 00:04:05, Oleg Nesterov wrote: > > > Note: this is only the first step, this patch doesn't try to solve other > > problems. For example it doesn't try to clear the wrongly set TIF_MEMDIE > > (SIGNAL_GROUP_COREDUMP check is obviously racy), > > I am

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Michal Hocko
On Fri 28-11-14 00:04:05, Oleg Nesterov wrote: > oom_kill.c assumes that PF_EXITING task should exit and free the memory > soon. This is wrong in many ways and one important case is the coredump. > A task can sleep in exit_mm() "forever" while the coredumping sub-thread > can need more memory. >

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Michal Hocko
On Fri 28-11-14 00:04:05, Oleg Nesterov wrote: oom_kill.c assumes that PF_EXITING task should exit and free the memory soon. This is wrong in many ways and one important case is the coredump. A task can sleep in exit_mm() forever while the coredumping sub-thread can need more memory. Change

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Oleg Nesterov
On 12/02, Michal Hocko wrote: On Fri 28-11-14 00:04:05, Oleg Nesterov wrote: Note: this is only the first step, this patch doesn't try to solve other problems. For example it doesn't try to clear the wrongly set TIF_MEMDIE (SIGNAL_GROUP_COREDUMP check is obviously racy), I am not sure I

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Michal Hocko
On Tue 02-12-14 18:50:41, Oleg Nesterov wrote: On 12/02, Michal Hocko wrote: On Fri 28-11-14 00:04:05, Oleg Nesterov wrote: Note: this is only the first step, this patch doesn't try to solve other problems. For example it doesn't try to clear the wrongly set TIF_MEMDIE

Re: [PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-12-02 Thread Oleg Nesterov
On 12/02, Michal Hocko wrote: On Tue 02-12-14 18:50:41, Oleg Nesterov wrote: On 12/02, Michal Hocko wrote: I guess the patch as is makes sense and it is an improvement. We need to call the helper in mem_cgroup_out_of_memory as well, though. Yes, but can't we do this in a separate

[PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-11-27 Thread Oleg Nesterov
oom_kill.c assumes that PF_EXITING task should exit and free the memory soon. This is wrong in many ways and one important case is the coredump. A task can sleep in exit_mm() "forever" while the coredumping sub-thread can need more memory. Change the PF_EXITING checks to take

[PATCH 1/2] oom: don't assume that a coredumping thread will exit soon

2014-11-27 Thread Oleg Nesterov
oom_kill.c assumes that PF_EXITING task should exit and free the memory soon. This is wrong in many ways and one important case is the coredump. A task can sleep in exit_mm() forever while the coredumping sub-thread can need more memory. Change the PF_EXITING checks to take SIGNAL_GROUP_COREDUMP