Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Roman Gushchin
On Wed, Jul 26, 2017 at 04:44:08PM +0200, Michal Hocko wrote: > On Wed 26-07-17 16:24:34, Michal Hocko wrote: > [...] > > Or if you prefer I can post it separately? > > I've just tried to rebase relevant parts on top of the current mmotm > tree and it needs some non-trivial updates. Would you

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Roman Gushchin
On Wed, Jul 26, 2017 at 04:44:08PM +0200, Michal Hocko wrote: > On Wed 26-07-17 16:24:34, Michal Hocko wrote: > [...] > > Or if you prefer I can post it separately? > > I've just tried to rebase relevant parts on top of the current mmotm > tree and it needs some non-trivial updates. Would you

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Michal Hocko
On Wed 26-07-17 16:24:34, Michal Hocko wrote: [...] > Or if you prefer I can post it separately? I've just tried to rebase relevant parts on top of the current mmotm tree and it needs some non-trivial updates. Would you mind if I post those patches with you on CC? I really think that we shouldn't

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Michal Hocko
On Wed 26-07-17 16:24:34, Michal Hocko wrote: [...] > Or if you prefer I can post it separately? I've just tried to rebase relevant parts on top of the current mmotm tree and it needs some non-trivial updates. Would you mind if I post those patches with you on CC? I really think that we shouldn't

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Michal Hocko
On Wed 26-07-17 15:06:07, Roman Gushchin wrote: > On Wed, Jul 26, 2017 at 03:56:22PM +0200, Michal Hocko wrote: > > On Wed 26-07-17 14:27:15, Roman Gushchin wrote: > > [...] > > > @@ -656,13 +658,24 @@ static void mark_oom_victim(struct task_struct *tsk) > > > struct mm_struct *mm = tsk->mm; > >

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Michal Hocko
On Wed 26-07-17 15:06:07, Roman Gushchin wrote: > On Wed, Jul 26, 2017 at 03:56:22PM +0200, Michal Hocko wrote: > > On Wed 26-07-17 14:27:15, Roman Gushchin wrote: > > [...] > > > @@ -656,13 +658,24 @@ static void mark_oom_victim(struct task_struct *tsk) > > > struct mm_struct *mm = tsk->mm; > >

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Roman Gushchin
On Wed, Jul 26, 2017 at 03:56:22PM +0200, Michal Hocko wrote: > On Wed 26-07-17 14:27:15, Roman Gushchin wrote: > [...] > > @@ -656,13 +658,24 @@ static void mark_oom_victim(struct task_struct *tsk) > > struct mm_struct *mm = tsk->mm; > > > > WARN_ON(oom_killer_disabled); > > - /* OOM

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Roman Gushchin
On Wed, Jul 26, 2017 at 03:56:22PM +0200, Michal Hocko wrote: > On Wed 26-07-17 14:27:15, Roman Gushchin wrote: > [...] > > @@ -656,13 +658,24 @@ static void mark_oom_victim(struct task_struct *tsk) > > struct mm_struct *mm = tsk->mm; > > > > WARN_ON(oom_killer_disabled); > > - /* OOM

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Michal Hocko
On Wed 26-07-17 14:27:15, Roman Gushchin wrote: [...] > @@ -656,13 +658,24 @@ static void mark_oom_victim(struct task_struct *tsk) > struct mm_struct *mm = tsk->mm; > > WARN_ON(oom_killer_disabled); > - /* OOM killer might race with memcg OOM */ > - if

Re: [v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Michal Hocko
On Wed 26-07-17 14:27:15, Roman Gushchin wrote: [...] > @@ -656,13 +658,24 @@ static void mark_oom_victim(struct task_struct *tsk) > struct mm_struct *mm = tsk->mm; > > WARN_ON(oom_killer_disabled); > - /* OOM killer might race with memcg OOM */ > - if

[v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Roman Gushchin
First, separate tsk_is_oom_victim() and TIF_MEMDIE flag checks: let the first one indicate that a task is killed by the OOM killer, and the second one indicate that a task has an access to the memory reserves (with a hope to eliminate it later). Second, set TIF_MEMDIE to all threads of an OOM

[v4 1/4] mm, oom: refactor the TIF_MEMDIE usage

2017-07-26 Thread Roman Gushchin
First, separate tsk_is_oom_victim() and TIF_MEMDIE flag checks: let the first one indicate that a task is killed by the OOM killer, and the second one indicate that a task has an access to the memory reserves (with a hope to eliminate it later). Second, set TIF_MEMDIE to all threads of an OOM