Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 22:57:37, Tetsuo Handa wrote: > On 2018/10/30 21:10, Michal Hocko wrote: > > I misunderstood your concern. oom_reaper would back off without > > MMF_OOF_SKIP as well. You are right we cannot assume anything about > > close callbacks so MMF_OOM_SKIP has to come before that. I will

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 22:57:37, Tetsuo Handa wrote: > On 2018/10/30 21:10, Michal Hocko wrote: > > I misunderstood your concern. oom_reaper would back off without > > MMF_OOF_SKIP as well. You are right we cannot assume anything about > > close callbacks so MMF_OOM_SKIP has to come before that. I will

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Tetsuo Handa
On 2018/10/30 21:10, Michal Hocko wrote: > I misunderstood your concern. oom_reaper would back off without > MMF_OOF_SKIP as well. You are right we cannot assume anything about > close callbacks so MMF_OOM_SKIP has to come before that. I will move it > behind the pagetable freeing. > And at that

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Tetsuo Handa
On 2018/10/30 21:10, Michal Hocko wrote: > I misunderstood your concern. oom_reaper would back off without > MMF_OOF_SKIP as well. You are right we cannot assume anything about > close callbacks so MMF_OOM_SKIP has to come before that. I will move it > behind the pagetable freeing. > And at that

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 21:02:40, Tetsuo Handa wrote: > On 2018/10/30 20:39, Michal Hocko wrote: > > On Tue 30-10-18 18:47:43, Tetsuo Handa wrote: > >> On 2018/10/30 15:31, Michal Hocko wrote: > >>> On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: > Michal Hocko wrote: > > @@ -3156,6 +3166,13 @@

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 21:02:40, Tetsuo Handa wrote: > On 2018/10/30 20:39, Michal Hocko wrote: > > On Tue 30-10-18 18:47:43, Tetsuo Handa wrote: > >> On 2018/10/30 15:31, Michal Hocko wrote: > >>> On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: > Michal Hocko wrote: > > @@ -3156,6 +3166,13 @@

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Tetsuo Handa
On 2018/10/30 20:39, Michal Hocko wrote: > On Tue 30-10-18 18:47:43, Tetsuo Handa wrote: >> On 2018/10/30 15:31, Michal Hocko wrote: >>> On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: Michal Hocko wrote: > @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) >

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Tetsuo Handa
On 2018/10/30 20:39, Michal Hocko wrote: > On Tue 30-10-18 18:47:43, Tetsuo Handa wrote: >> On 2018/10/30 15:31, Michal Hocko wrote: >>> On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: Michal Hocko wrote: > @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) >

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 18:47:43, Tetsuo Handa wrote: > On 2018/10/30 15:31, Michal Hocko wrote: > > On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: > >> Michal Hocko wrote: > >>> @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) > >>> vma = remove_vma(vma); > >>> } > >>>

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 18:47:43, Tetsuo Handa wrote: > On 2018/10/30 15:31, Michal Hocko wrote: > > On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: > >> Michal Hocko wrote: > >>> @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) > >>> vma = remove_vma(vma); > >>> } > >>>

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Tetsuo Handa
On 2018/10/30 15:31, Michal Hocko wrote: > On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: >> Michal Hocko wrote: >>> @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) >>> vma = remove_vma(vma); >>> } >>> vm_unacct_memory(nr_accounted); >>> + >>> + /*

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Tetsuo Handa
On 2018/10/30 15:31, Michal Hocko wrote: > On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: >> Michal Hocko wrote: >>> @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) >>> vma = remove_vma(vma); >>> } >>> vm_unacct_memory(nr_accounted); >>> + >>> + /*

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: > Michal Hocko wrote: > > @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) > > vma = remove_vma(vma); > > } > > vm_unacct_memory(nr_accounted); > > + > > + /* > > +* Now that the full address

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-30 Thread Michal Hocko
On Tue 30-10-18 13:45:22, Tetsuo Handa wrote: > Michal Hocko wrote: > > @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) > > vma = remove_vma(vma); > > } > > vm_unacct_memory(nr_accounted); > > + > > + /* > > +* Now that the full address

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-29 Thread Tetsuo Handa
Michal Hocko wrote: > @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) > vma = remove_vma(vma); > } > vm_unacct_memory(nr_accounted); > + > + /* > +* Now that the full address space is torn down, make sure the > +* OOM killer skips

Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-29 Thread Tetsuo Handa
Michal Hocko wrote: > @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm) > vma = remove_vma(vma); > } > vm_unacct_memory(nr_accounted); > + > + /* > +* Now that the full address space is torn down, make sure the > +* OOM killer skips

[RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-25 Thread Michal Hocko
From: Michal Hocko David Rientjes has noted that certain user space memory allocators leave a lot of page tables behind and the current implementation of oom_reaper doesn't deal with those workloads very well. In order to improve these workloads define a point when exit_mmap is guaranteed to

[RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish

2018-10-25 Thread Michal Hocko
From: Michal Hocko David Rientjes has noted that certain user space memory allocators leave a lot of page tables behind and the current implementation of oom_reaper doesn't deal with those workloads very well. In order to improve these workloads define a point when exit_mmap is guaranteed to