lkml.org 
[lkml]   [2018]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v2] mm, oom: fix concurrent munlock and oom reaperunmap
On Tue 24-04-18 14:07:52, David Rientjes wrote:
> On Tue, 24 Apr 2018, Michal Hocko wrote:
>
> > > > > My patch has passed intensive testing on both x86 and powerpc, so I'll ask
> > > > > that it's pushed for 4.17-rc3. Many thanks to Tetsuo for the suggestion
> > > > > on calling __oom_reap_task_mm() from exit_mmap().
> > > >
> > > > Yeah, but your patch does have a problem with blockable mmu notifiers
> > > > IIUC.
> > >
> > > What on earth are you talking about? exit_mmap() does
> > > mmu_notifier_release(). There are no blockable mmu notifiers.
> >
> > MMF_OOM_SKIP - remember? The thing that guarantees a forward progress.
> > So we cannot really depend on setting MMF_OOM_SKIP if a
> > mmu_notifier_release blocks for an excessive/unbounded amount of time.
> >
>
> If the thread is blocked in exit_mmap() because of mmu_notifier_release()
> then the oom reaper will eventually grab mm->mmap_sem (nothing holding it
> in exit_mmap()), return true, and oom_reap_task() will set MMF_OOM_SKIP.
> This is unchanged with the patch and is a completely separate issue.

I must be missing something or we are talking past each other. So let me
be explicit. What does prevent the following

oom_reaper exit_mmap
mutex_lock(oom_lock)
mutex_lock(oom_lock) __oom_reap_task_mm
mmu_notifier_invalidate_range_start
# blockable mmu_notifier
# which takes ages to
# finish or depends on
# an allocation (in)directly
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2018-04-25 01:08    [W:1.838 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site