lkml.org 
[lkml]   [2018]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v3] mm, oom: fix unnecessary killing of additional processes
On Mon, 9 Jul 2018, Michal Hocko wrote:

> > Blockable mmu notifiers and mlocked memory is not the extent of the
> > problem, if a process has a lot of virtual memory we must wait until
> > free_pgtables() completes in exit_mmap() to prevent unnecessary oom
> > killing. For implementations such as tcmalloc, which does not release
> > virtual memory, this is important because, well, it releases this only at
> > exit_mmap(). Of course we cannot do that with only the protection of
> > mm->mmap_sem for read.
>
> And how exactly a timeout helps to prevent from "unnecessary killing" in
> that case?

As my patch does, it becomes mandatory to move MMF_OOM_SKIP to after
free_pgtables() in exit_mmap() and then repurpose MMF_UNSTABLE to
indicate that the oom reaper should not operate on a given mm. In the
event we cannot reach MMF_OOM_SKIP, we need to ensure forward progress and
that is possible with a timeout period in the very rare instance where
additional memory freeing is needed, and without unnecessary oom killing
when it is not needed.

\
 
 \ /
  Last update: 2018-07-09 22:31    [W:0.114 / U:4.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site