lkml.org 
[lkml]   [2015]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: can't oom-kill zap the victim's memory?
On Mon, 21 Sep 2015, Oleg Nesterov wrote:

> Yes we should try to do this in the OOM killer context, and in this case
> (of course) we need trylock. Let me quote my previous email:
>
> And we want to avoid using workqueues when the caller can do this
> directly. And in this case we certainly need trylock. But this needs
> some refactoring: we do not want to do this under oom_lock, otoh it
> makes sense to do this from mark_oom_victim() if current && killed,
> and a lot more details.
>
> and probably this is another reason why do we need MMF_MEMDIE. But again,
> I think the initial change should be simple.
>

I agree with the direction and I don't think it would be too complex to
have a dedicated kthread that is kicked when we queue an mm to do
MADV_DONTNEED behavior, and have that happen only if a trylock in
oom_kill_process() fails to do it itself for anonymous mappings. We may
have different opinions of simplicity.


\
 
 \ /
  Last update: 2015-09-22 02:01    [W:0.174 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site