Re: [PATCH -v2] freezer: check OOM kill while being frozen

2014-10-20 Thread Oleg Nesterov
On 10/20, Michal Hocko wrote: > > On Fri 17-10-14 18:10:21, Oleg Nesterov wrote: > > > And if this is not safe, it is not clear how/why cgroup_freezing() can > > save us, both pm_freezing and CGROUP_FREEZING can be true? > > You mean that the pm_freezer would race with cgroup one? Yes, so if we ac

Re: [PATCH -v2] freezer: check OOM kill while being frozen

2014-10-20 Thread Michal Hocko
On Fri 17-10-14 18:10:21, Oleg Nesterov wrote: > On 10/17, Michal Hocko wrote: > > > > I think we should rather get back to __thaw_task here. > > Yes, agreed. > > > Andrew could you replace the previous version by this one, please? > > Yes, that patch should be dropped... > > > And can't resis

Re: [PATCH -v2] freezer: check OOM kill while being frozen

2014-10-17 Thread Michal Hocko
On Fri 17-10-14 18:10:21, Oleg Nesterov wrote: > On 10/17, Michal Hocko wrote: > > > > I think we should rather get back to __thaw_task here. > > Yes, agreed. > > > Andrew could you replace the previous version by this one, please? > > Yes, that patch should be dropped... Andrew, drop all three

Re: [PATCH -v2] freezer: check OOM kill while being frozen

2014-10-17 Thread Oleg Nesterov
On 10/17, Michal Hocko wrote: > > I think we should rather get back to __thaw_task here. Yes, agreed. > Andrew could you replace the previous version by this one, please? Yes, that patch should be dropped... And can't resist... please look at http://marc.info/?l=linux-kernel&m=138427535430827

Re: [Patch v2] freezer: check OOM kill while being frozen

2014-08-13 Thread Cong Wang
On Wed, Aug 13, 2014 at 2:26 AM, Michal Hocko wrote: > On Tue 12-08-14 17:53:33, Cong Wang wrote: >> On Tue, Aug 12, 2014 at 4:44 AM, Michal Hocko wrote: > [...] >> >> @@ -147,12 +156,6 @@ void __thaw_task(struct task_struct *p) >> >> { >> >> unsigned long flags; >> >> >> >> - /* >> >>

Re: [Patch v2] freezer: check OOM kill while being frozen

2014-08-13 Thread Michal Hocko
On Tue 12-08-14 17:53:33, Cong Wang wrote: > On Tue, Aug 12, 2014 at 4:44 AM, Michal Hocko wrote: [...] > >> @@ -147,12 +156,6 @@ void __thaw_task(struct task_struct *p) > >> { > >> unsigned long flags; > >> > >> - /* > >> - * Clear freezing and kick @p if FROZEN. Clearing is guar

Re: [Patch v2] freezer: check OOM kill while being frozen

2014-08-12 Thread Cong Wang
On Tue, Aug 12, 2014 at 4:44 AM, Michal Hocko wrote: > Has it stopped working as a result of a3201227f803 (freezer: make > freezing() test freeze conditions in effect instead of TIF_FREEZE)? > It removes clear_freeze_flag from __thaw_task and so the OOM victim > cannot escape from the refrigerator

Re: [Patch v2] freezer: check OOM kill while being frozen

2014-08-12 Thread Michal Hocko
On Mon 11-08-14 17:53:54, Cong Wang wrote: > There is a race condition between OOM killer and freezer when > they try to operate on the same process, something like below: > > Process A Process B Process C > trigger page fault > then trigger oom > B=oom_scan_process_thr