Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Michal Hocko
On Wed 08-08-18 21:57:13, Tetsuo Handa wrote: [...] > Also, before the OOM reaper was introduced, we waited until TIF_MEMDIE is > cleared from the OOM victim thread. Compared to pre OOM reaper era, giving up > so early is certainly a regression. We did clear TIF_MEMDIE flag after mmput() in

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Michal Hocko
On Wed 08-08-18 21:57:13, Tetsuo Handa wrote: [...] > Also, before the OOM reaper was introduced, we waited until TIF_MEMDIE is > cleared from the OOM victim thread. Compared to pre OOM reaper era, giving up > so early is certainly a regression. We did clear TIF_MEMDIE flag after mmput() in

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Tetsuo Handa
On 2018/08/08 5:38, Tetsuo Handa wrote: > On 2018/08/08 5:19, Johannes Weiner wrote: >> On Tue, Aug 07, 2018 at 07:15:11PM +0900, Tetsuo Handa wrote: >>> On 2018/08/07 16:25, Michal Hocko wrote: @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Tetsuo Handa
On 2018/08/08 5:38, Tetsuo Handa wrote: > On 2018/08/08 5:19, Johannes Weiner wrote: >> On Tue, Aug 07, 2018 at 07:15:11PM +0900, Tetsuo Handa wrote: >>> On 2018/08/07 16:25, Michal Hocko wrote: @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Michal Hocko
On Wed 08-08-18 08:44:14, Michal Hocko wrote: > On Tue 07-08-18 16:54:25, Johannes Weiner wrote: [...] > > What the global OOM killer does in that situation is dump the header > > anyway: > > > > /* Found nothing?!?! Either we hang forever, or we panic. */ > > if (!oc->chosen &&

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Michal Hocko
On Wed 08-08-18 08:44:14, Michal Hocko wrote: > On Tue 07-08-18 16:54:25, Johannes Weiner wrote: [...] > > What the global OOM killer does in that situation is dump the header > > anyway: > > > > /* Found nothing?!?! Either we hang forever, or we panic. */ > > if (!oc->chosen &&

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Michal Hocko
On Tue 07-08-18 16:54:25, Johannes Weiner wrote: > On Tue, Aug 07, 2018 at 10:23:32PM +0200, Michal Hocko wrote: > > On Tue 07-08-18 16:02:47, Johannes Weiner wrote: > > > On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > > > > From: Michal Hocko > > > > > > > > "memcg, oom: move

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-08 Thread Michal Hocko
On Tue 07-08-18 16:54:25, Johannes Weiner wrote: > On Tue, Aug 07, 2018 at 10:23:32PM +0200, Michal Hocko wrote: > > On Tue 07-08-18 16:02:47, Johannes Weiner wrote: > > > On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > > > > From: Michal Hocko > > > > > > > > "memcg, oom: move

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Johannes Weiner
On Tue, Aug 07, 2018 at 10:23:32PM +0200, Michal Hocko wrote: > On Tue 07-08-18 16:02:47, Johannes Weiner wrote: > > On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > "memcg, oom: move out_of_memory back to the charge path" has added a > > >

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Johannes Weiner
On Tue, Aug 07, 2018 at 10:23:32PM +0200, Michal Hocko wrote: > On Tue 07-08-18 16:02:47, Johannes Weiner wrote: > > On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > "memcg, oom: move out_of_memory back to the charge path" has added a > > >

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Tetsuo Handa
On 2018/08/08 5:19, Johannes Weiner wrote: > On Tue, Aug 07, 2018 at 07:15:11PM +0900, Tetsuo Handa wrote: >> On 2018/08/07 16:25, Michal Hocko wrote: >>> @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct >>> mem_cgroup *memcg, gfp_t mask, int >>> return OOM_ASYNC;

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Tetsuo Handa
On 2018/08/08 5:19, Johannes Weiner wrote: > On Tue, Aug 07, 2018 at 07:15:11PM +0900, Tetsuo Handa wrote: >> On 2018/08/07 16:25, Michal Hocko wrote: >>> @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct >>> mem_cgroup *memcg, gfp_t mask, int >>> return OOM_ASYNC;

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Michal Hocko
On Tue 07-08-18 16:02:47, Johannes Weiner wrote: > On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > "memcg, oom: move out_of_memory back to the charge path" has added a > > warning triggered when the oom killer cannot find any eligible task > > and so

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Michal Hocko
On Tue 07-08-18 16:02:47, Johannes Weiner wrote: > On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > "memcg, oom: move out_of_memory back to the charge path" has added a > > warning triggered when the oom killer cannot find any eligible task > > and so

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Johannes Weiner
On Tue, Aug 07, 2018 at 07:15:11PM +0900, Tetsuo Handa wrote: > On 2018/08/07 16:25, Michal Hocko wrote: > > @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct > > mem_cgroup *memcg, gfp_t mask, int > > return OOM_ASYNC; > > } > > > > - if

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Johannes Weiner
On Tue, Aug 07, 2018 at 07:15:11PM +0900, Tetsuo Handa wrote: > On 2018/08/07 16:25, Michal Hocko wrote: > > @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct > > mem_cgroup *memcg, gfp_t mask, int > > return OOM_ASYNC; > > } > > > > - if

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Johannes Weiner
On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > From: Michal Hocko > > "memcg, oom: move out_of_memory back to the charge path" has added a > warning triggered when the oom killer cannot find any eligible task > and so there is no way to reclaim the oom memcg under its hard

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Johannes Weiner
On Tue, Aug 07, 2018 at 09:25:53AM +0200, Michal Hocko wrote: > From: Michal Hocko > > "memcg, oom: move out_of_memory back to the charge path" has added a > warning triggered when the oom killer cannot find any eligible task > and so there is no way to reclaim the oom memcg under its hard

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Michal Hocko
On Tue 07-08-18 19:15:11, Tetsuo Handa wrote: [...] > Of course, if the hard limit is 0, all processes will be killed after all. But > Michal is ignoring the fact that if the hard limit were not 0, there is a > chance > of saving next process from needlessly killed if we waited until "mm of >

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Michal Hocko
On Tue 07-08-18 19:15:11, Tetsuo Handa wrote: [...] > Of course, if the hard limit is 0, all processes will be killed after all. But > Michal is ignoring the fact that if the hard limit were not 0, there is a > chance > of saving next process from needlessly killed if we waited until "mm of >

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Tetsuo Handa
On 2018/08/07 16:25, Michal Hocko wrote: > @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct mem_cgroup > *memcg, gfp_t mask, int > return OOM_ASYNC; > } > > - if (mem_cgroup_out_of_memory(memcg, mask, order)) > + if (mem_cgroup_out_of_memory(memcg,

Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Tetsuo Handa
On 2018/08/07 16:25, Michal Hocko wrote: > @@ -1703,7 +1703,8 @@ static enum oom_status mem_cgroup_oom(struct mem_cgroup > *memcg, gfp_t mask, int > return OOM_ASYNC; > } > > - if (mem_cgroup_out_of_memory(memcg, mask, order)) > + if (mem_cgroup_out_of_memory(memcg,

[PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Michal Hocko
From: Michal Hocko "memcg, oom: move out_of_memory back to the charge path" has added a warning triggered when the oom killer cannot find any eligible task and so there is no way to reclaim the oom memcg under its hard limit. Further charges for such a memcg are forced and therefore the hard

[PATCH] memcg, oom: be careful about races when warning about no reclaimable task

2018-08-07 Thread Michal Hocko
From: Michal Hocko "memcg, oom: move out_of_memory back to the charge path" has added a warning triggered when the oom killer cannot find any eligible task and so there is no way to reclaim the oom memcg under its hard limit. Further charges for such a memcg are forced and therefore the hard